1 # Top level Makefile for rpm
3 AUTOMAKE_OPTIONS = 1.4 foreign
5 EXTRA_DIST = CHANGES CREDITS GROUPS README.amiga INSTALL \
6 RPM-GPG-KEY RPM-PGP-KEY \
7 autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
8 gendiff po/*.in po/*.po po/rpm.pot \
9 python/*.am python/*.in python/*.c python/*.h python/testit \
10 rpm.magic rpmpopt rpm.spec
12 EXTRA_PROGRAMS = rpmconvert
14 # XXX TODO: python perl
15 SUBDIRS = intl po popt build lib misc tools scripts tests doc .
18 -I$(top_srcdir)/build \
20 -I$(top_srcdir)/popt \
23 mylibs= $(top_builddir)/build/librpmbuild.la \
24 $(top_builddir)/lib/librpm.la \
25 $(top_builddir)/popt/libpopt.la \
29 LDFLAGS = @LDFLAGS_STATIC@
31 rpmbindir = `echo $(bindir) | sed -e s,usr/bin,bin,`
34 bin_PROGRAMS = rpm2cpio
37 noinst_PROGRAMS = @BUILD_RPMCONVERT@
39 pkglibdir = @RPMCONFIGDIR@
40 pkglib_DATA = rpmrc rpmpopt macros
41 pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
42 config.guess config.sub
45 acconfig.h build.h system.h
47 rpm_SOURCES = build.c rpm.c
50 $(PROGRAMS): $(mylibs)
54 lclint ${DEFS} ${INCLUDES} ${rpm_SOURCES}
56 CVSTAG = r$(subst .,-,$(VERSION))
58 rpm2cpio_SOURCES = rpm2cpio.c
59 rpm2cpio_LDADD = $(mylibs)
61 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
62 ## Libmisc.a is required for rpmconvert.
63 rpmconvert_LDADD = $(mylibs) -lgdbm
66 @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
67 @rm -f $(DESTDIR)/$(libdir)/rpmrc
68 @ln -s rpm/rpmrc $(DESTDIR)/$(libdir)/rpmrc
69 @rm -f $(DESTDIR)/$(libdir)/rpmpopt
70 @ln -s rpm/rpmpopt $(DESTDIR)/$(libdir)/rpmpopt
71 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
72 @case "@build_cpu@" in \
73 *86) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i386 ;;\
74 alpha*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/alpha ;;\
75 sparc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc;\
76 $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc64 ;;\
77 powerpc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/ppc ;;\
79 @case "@build_os@" in \
80 mint) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/m68kmint ;;\
81 *) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@ ;;\
83 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/noarch
84 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SOURCES
85 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SPECS
86 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
87 @$(mkinstalldirs) $(DESTDIR)/var/tmp
91 rm -rf /tmp/rpm-$(VERSION)
92 $(MAKE) DESTDIR=/tmp/rpm-$(VERSION) install
93 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
97 find . -name "Makefile" -exec rm {} \;
98 rm -f *gz *rpm config.*
102 @cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \
104 echo "==> Please resolve differences between the repository and" ; \
105 echo "==> your rpm check out before tagging." ; \
111 @cvs -d `cat CVS/Root` -Q tag -F $(CVSTAG) .
114 @echo "The final archive is ./rpm-$(VERSION).tar.gz."
117 nextsrpm: all archive
118 @sudo ./rpm -ta rpm-$(VERSION).tar.gz