1 # Top level Makefile for rpm
3 AUTOMAKE_OPTIONS = 1.4 foreign
5 EXTRA_DIST = CHANGES CREDITS README.amiga RPM-PGP-KEY \
6 autodeps/none autodeps/*.prov autodeps/*.req autogen.sh \
7 docs/[a-z]* gendiff groups po/*.in po/*.po po/rpm.pot \
8 rpm.8 rpm.8ru rpm.magic rpm.spec rpm2cpio.8 rpm2cpio.8ru
10 SUBDIRS = popt build lib po intl misc tools scripts tests .
12 INCLUDES = -I$(top_srcdir)/build -I$(top_srcdir)/lib -I$(top_srcdir)/intl @INCPATH@
14 LDFLAGS = @LDFLAGS_STATIC@ -L$(top_builddir)/build -L$(top_builddir)/lib -L$(top_builddir)/popt -L$(top_builddir)/misc
16 rpmbindir = $(subst usr/bin,bin,$(bindir))
19 bin_PROGRAMS = rpm2cpio
21 noinst_PROGRAMS = rpmconvert
23 man_MANS = rpm.8 rpm2cpio.8
25 configdir = @RPMCONFIGDIR@
26 config_DATA = rpmrc rpmpopt macros
27 config_SCRIPTS = find-provides find-requires mkinstalldirs
30 acconfig.h build.h checksig.h ftp.h \
31 install.h system.h url.h \
34 rpm_SOURCES = build.c checksig.c ftp.c install.c rpm.c url.c \
36 rpm_LDADD = -lrpmbuild -lrpm -lpopt @LIBMISC@
38 $(PROGRAMS): ./build/librpmbuild.a ./lib/librpm.a ./popt/libpopt.a
40 include ./Makefile.inc
44 lclint ${DEFS} ${INCLUDES} ${rpm_SOURCES}
46 CVSTAG = r$(subst .,-,$(VERSION))
48 rpm2cpio_SOURCES = rpm2cpio.c
49 rpm2cpio_LDADD = -lrpmbuild -lrpm -lpopt
51 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
52 rpmconvert_LDADD = -lrpmbuild -lrpm -lpopt -lgdbm
55 @$(mkinstalldirs) $(DESTDIR)/var/lib/rpm
56 @rm -f $(DESTDIR)/$(libdir)/rpmrc
57 @ln -s rpm/rpmrc $(DESTDIR)/$(libdir)/rpmrc
58 @rm -f $(DESTDIR)/$(libdir)/rpmpopt
59 @ln -s rpm/rpmpopt $(DESTDIR)/$(libdir)/rpmpopt
60 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
61 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/noarch
62 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@
63 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SOURCES
64 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SPECS
65 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
66 @$(mkinstalldirs) $(DESTDIR)/var/lib/rpm
67 @$(mkinstalldirs) $(DESTDIR)/var/tmp
69 # FIXME: these should be generated in configure.in
70 find-requires: find-requires.sh
72 find-provides: find-provides.sh
77 # FIXME: these should be checked
80 rm -rf /tmp/rpm-$(VERSION)
81 make installprefix=/tmp/rpm-$(VERSION)$(ROOT) install
82 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SOURCES
83 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SPECS
84 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SRPMS
85 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/RPMS
86 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/BUILD
87 $(mkinstalldirs) /tmp/rpm-$(VERSION)/var/local/lib/rpm
88 $(mkinstalldirs) /tmp/rpm-$(VERSION)/var/tmp
89 # Couldn't figure de ARCH value
90 # $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/RPMS/i386
91 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
95 find . -name "Makefile" -exec rm {} \;
96 rm -f *gz *rpm config.*
101 @echo "I hope you checked everything out and made sure it builds"
102 @echo "maybe someday Erik will get around to making that automatic."
104 @echo "This is version $(VERSION)."
106 @cvs -Q tag -F $(CVSTAG) .
107 @rm -rf /tmp/rpm-$(VERSION) /tmp/rpm
108 @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) rpm || :
109 @mv /tmp/rpm /tmp/rpm-$(VERSION)
110 @rm /tmp/rpm-$(VERSION)/popt/popt.spec
111 @cd /tmp/rpm-$(VERSION); ./autogen.sh
112 @make -C /tmp/rpm-$(VERSION) distclean
113 @cd /tmp/rpm-$(VERSION); ./autogen.sh --noconfigure
114 @cd /tmp; tar czSpf rpm-$(VERSION).tar.gz rpm-$(VERSION)
115 @rm -rf /tmp/rpm-$(VERSION)
116 @cp /tmp/rpm-$(VERSION).tar.gz .
117 @rm -f /tmp/rpm-$(VERSION).tar.gz
119 @echo "The final archive is ./rpm-$(VERSION).tar.gz."