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 $(man_MANS) po/*.in po/*.po po/rpm.pot \
8 rpm.magic rpmpopt rpm.spec rpm.8ru 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 mylibs= $(top_builddir)/build/librpmbuild.la \
15 $(top_builddir)/lib/librpm.la \
16 $(top_builddir)/popt/libpopt.la
18 LDFLAGS = @LDFLAGS_STATIC@
20 rpmbindir = $(subst usr/bin,bin,$(bindir))
23 bin_PROGRAMS = rpm2cpio
25 noinst_PROGRAMS = rpmconvert
27 man_MANS = rpm.8 rpm2cpio.8 # rpm.8ru rpm2cpio.8ru
29 configdir = @RPMCONFIGDIR@
30 config_DATA = rpmrc rpmpopt macros
31 config_SCRIPTS = find-provides find-requires mkinstalldirs
34 acconfig.h build.h checksig.h ftp.h \
35 install.h system.h url.h \
38 rpm_SOURCES = build.c checksig.c ftp.c install.c rpm.c url.c \
40 rpm_LDADD = $(mylibs) @LIBMISC@
42 $(PROGRAMS): $(mylibs) @LIBMISC@
46 lclint ${DEFS} ${INCLUDES} ${rpm_SOURCES}
48 CVSTAG = r$(subst .,-,$(VERSION))
50 rpm2cpio_SOURCES = rpm2cpio.c
51 rpm2cpio_LDADD = $(mylibs)
53 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
54 rpmconvert_LDADD = $(mylibs) -lgdbm
57 @$(mkinstalldirs) $(DESTDIR)/var/lib/rpm
58 @rm -f $(DESTDIR)/$(libdir)/rpmrc
59 @ln -s rpm/rpmrc $(DESTDIR)/$(libdir)/rpmrc
60 @rm -f $(DESTDIR)/$(libdir)/rpmpopt
61 @ln -s rpm/rpmpopt $(DESTDIR)/$(libdir)/rpmpopt
62 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
63 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/noarch
64 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@
65 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SOURCES
66 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SPECS
67 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
68 @$(mkinstalldirs) $(DESTDIR)/var/lib/rpm
69 @$(mkinstalldirs) $(DESTDIR)/var/tmp
71 # FIXME: these should be generated in configure.in
72 find-requires: find-requires.sh
74 find-provides: find-provides.sh
79 # FIXME: these should be checked
82 rm -rf /tmp/rpm-$(VERSION)
83 make installprefix=/tmp/rpm-$(VERSION)$(ROOT) install
84 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SOURCES
85 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SPECS
86 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SRPMS
87 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/RPMS
88 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/BUILD
89 $(mkinstalldirs) /tmp/rpm-$(VERSION)/var/local/lib/rpm
90 $(mkinstalldirs) /tmp/rpm-$(VERSION)/var/tmp
91 # Couldn't figure de ARCH value
92 # $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/RPMS/i386
93 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
97 find . -name "Makefile" -exec rm {} \;
98 rm -f *gz *rpm config.*
103 @echo "I hope you checked everything out and made sure it builds"
104 @echo "maybe someday Erik will get around to making that automatic."
106 @echo "This is version $(VERSION)."
108 @cvs -Q tag -F $(CVSTAG) .
109 @rm -rf /tmp/rpm-$(VERSION) /tmp/rpm
110 @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) rpm || :
111 @mv /tmp/rpm /tmp/rpm-$(VERSION)
112 @rm /tmp/rpm-$(VERSION)/popt/popt.spec
113 @cd /tmp/rpm-$(VERSION); ./autogen.sh
114 @make -C /tmp/rpm-$(VERSION) distclean
115 @cd /tmp/rpm-$(VERSION); ./autogen.sh --noconfigure
116 @cd /tmp; tar czSpf rpm-$(VERSION).tar.gz rpm-$(VERSION)
117 @rm -rf /tmp/rpm-$(VERSION)
118 @cp /tmp/rpm-$(VERSION).tar.gz .
119 @rm -f /tmp/rpm-$(VERSION).tar.gz
121 @echo "The final archive is ./rpm-$(VERSION).tar.gz."