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 pkglibdir = @RPMCONFIGDIR@
30 pkglib_DATA = rpmrc rpmpopt macros
31 pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
32 config.guess config.sub
35 acconfig.h build.h checksig.h ftp.h \
36 install.h system.h url.h \
39 rpm_SOURCES = build.c checksig.c ftp.c install.c rpm.c url.c \
41 rpm_LDADD = $(mylibs) @LIBMISC@
43 $(PROGRAMS): $(mylibs) @LIBMISC@
47 lclint ${DEFS} ${INCLUDES} ${rpm_SOURCES}
49 CVSTAG = r$(subst .,-,$(VERSION))
51 rpm2cpio_SOURCES = rpm2cpio.c
52 rpm2cpio_LDADD = $(mylibs)
54 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
55 rpmconvert_LDADD = $(mylibs) -lgdbm
58 @$(mkinstalldirs) $(DESTDIR)/var/lib/rpm
59 @rm -f $(DESTDIR)/$(libdir)/rpmrc
60 @ln -s rpm/rpmrc $(DESTDIR)/$(libdir)/rpmrc
61 @rm -f $(DESTDIR)/$(libdir)/rpmpopt
62 @ln -s rpm/rpmpopt $(DESTDIR)/$(libdir)/rpmpopt
63 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
64 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/noarch
65 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@
66 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SOURCES
67 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SPECS
68 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
69 @$(mkinstalldirs) $(DESTDIR)/var/lib/rpm
70 @$(mkinstalldirs) $(DESTDIR)/var/tmp
72 # FIXME: these should be checked
75 rm -rf /tmp/rpm-$(VERSION)
76 make installprefix=/tmp/rpm-$(VERSION)$(ROOT) install
77 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SOURCES
78 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SPECS
79 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/SRPMS
80 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/RPMS
81 $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/BUILD
82 $(mkinstalldirs) /tmp/rpm-$(VERSION)/var/local/lib/rpm
83 $(mkinstalldirs) /tmp/rpm-$(VERSION)/var/tmp
84 # Couldn't figure de ARCH value
85 # $(mkinstalldirs) /tmp/rpm-$(VERSION)/usr/local/src/redhat/RPMS/i386
86 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
90 find . -name "Makefile" -exec rm {} \;
91 rm -f *gz *rpm config.*
95 @cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \
97 echo "==> Please resolve differences between the repository and" ; \
98 echo "==> your rpm check out before tagging." ; \
104 @cvs -d `cat CVS/Root` -Q tag -F $(CVSTAG) .
107 @echo "The final archive is ./rpm-$(VERSION).tar.gz."
110 nextsrpm: all archive
111 @sudo ./rpm -ta rpm-$(VERSION).tar.gz