1 # Top level Makefile for rpm
3 AUTOMAKE_OPTIONS = 1.3 foreign
5 SUBDIRS = popt build lib po intl misc tools scripts
7 INCLUDES = -I./build -I./lib -I./intl @INCPATH@
9 LDFLAGS = @LDFLAGS_STATIC@ -L./popt -L./build -L./lib -L./misc
11 rpmbindir = $(subst usr/bin,bin,$(bindir))
14 bin_PROGRAMS = rpm2cpio
16 noinst_PROGRAMS = rpmconvert
18 man_MANS = rpm.8 rpm2cpio.8
20 configdir = @RPMCONFIGDIR@
21 config_DATA = rpmrc rpmpopt macros
22 config_SCRIPTS = find-provides find-requires mkinstalldirs
25 acconfig.h build.h checksig.h ftp.h \
26 install.h query.h system.h url.h \
29 rpm_SOURCES = build.c checksig.c ftp.c install.c query.c rpm.c url.c \
31 rpm_LDADD = -lrpmbuild -lpopt -lrpm @LIBMISC@
35 -DRPMNLSDIR=\"$(RPMNLSDIR)\" \
36 -DRPMNLSPACKAGE=\"$(PACKAGE)\" \
37 -DVERSION=\"$(VERSION)\" \
38 -DLIBRPMALIAS_FILENAME=\"$(LIBRPMALIAS_FILENAME)\" \
39 -DRPMCONFIGDIR="\"$(RPMCONFIGDIR)"\" \
42 include ./Makefile.inc
44 CVSTAG = r$(subst .,-,$(VERSION))
46 rpm2cpio_SOURCES = rpm2cpio.c
47 rpm2cpio_LDADD = -lrpmbuild -lpopt -lrpm
49 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
50 rpmconvert_LDADD = -lrpmbuild -lpopt -lrpm -lgdbm
53 ln -s rpm/rpmrc $(libdir)/rpmrc
54 ln -s rpm/rpmpopt $(libdir)/rpmpopt
56 # FIXME: these should be generated in configure.in
57 find-requires: find-requires.sh
59 find-provides: find-provides.sh
64 # FIXME: these should be checked
67 rm -rf /tmp/rpm-$(VERSION)
68 make installprefix=/tmp/rpm-$(VERSION)$(ROOT) install
69 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SOURCES
70 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SPECS
71 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SRPMS
72 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/RPMS
73 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/BUILD
74 $(mkinstalldirs) /tmp/rpm-$(VERSION)/var/local/lib/rpm
75 $(mkinstalldirs) /tmp/rpm-$(VERSION)/var/tmp
76 # Couldn't figure de ARCH value
77 # $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/RPMS/i386
78 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
82 find . -name "Makefile" -exec rm {} \;
83 rm -f *gz *rpm config.*
88 @echo "I hope you checked everything out and made sure it builds"
89 @echo "maybe someday Erik will get around to making that automatic."
91 @echo "This is version $(VERSION)."
93 @cvs -Q tag -F $(CVSTAG) .
94 @rm -rf /tmp/rpm-$(VERSION) /tmp/rpm
95 @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) rpm || :
96 @mv /tmp/rpm /tmp/rpm-$(VERSION)
97 @rm /tmp/rpm-$(VERSION)/popt/popt.spec
98 @cd /tmp/rpm-$(VERSION); ./autogen.sh ; make depend; make distclean
99 @cd /tmp/rpm-$(VERSION); ./autogen.sh --noconfigure
100 @cd /tmp; tar czSpf rpm-$(VERSION).tar.gz rpm-$(VERSION)
101 @rm -rf /tmp/rpm-$(VERSION)
102 @cp /tmp/rpm-$(VERSION).tar.gz .
103 @rm -f /tmp/rpm-$(VERSION).tar.gz
105 @echo "The final archive is ./rpm-$(VERSION).tar.gz."