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 .
17 INCLUDES = -I$(top_srcdir)/build -I$(top_srcdir)/lib -I$(top_srcdir)/popt \
20 myldflags= -L$(top_builddir)/build -L$(top_builddir)/lib -L$(top_builddir)/popt
21 # XXX libtool generates dependent libs.
22 myldadd= $(top_builddir)/build/librpmbuild.la \
25 LDFLAGS = @LDFLAGS_STATIC@ $(myldflags)
28 rpmbindir = `echo $(bindir) | sed -e s,usr/bin,bin,`
31 bin_PROGRAMS = rpm2cpio
34 noinst_PROGRAMS = @BUILD_RPMCONVERT@
36 pkglibdir = @RPMCONFIGDIR@
37 pkglib_DATA = rpmrc rpmpopt macros
38 pkglib_SCRIPTS = find-provides find-requires mkinstalldirs \
39 config.guess config.sub
42 acconfig.h build.h system.h
44 rpm_SOURCES = build.c rpm.c
46 $(PROGRAMS): $(myldadd)
50 lclint ${DEFS} ${INCLUDES} ${rpm_SOURCES}
52 CVSTAG = r$(subst .,-,$(VERSION))
54 rpm2cpio_SOURCES = rpm2cpio.c
56 rpmconvert_SOURCES = convertdb.c oldrpmdb.c
57 ## Libmisc.a is required for rpmconvert.
58 rpmconvert_LDADD = $(myldadd) -lgdbm
61 @$(mkinstalldirs) $(DESTDIR)$(varprefix)/lib/rpm
62 @rm -f $(DESTDIR)/$(libdir)/rpmrc
63 @ln -s rpm/rpmrc $(DESTDIR)/$(libdir)/rpmrc
64 @rm -f $(DESTDIR)/$(libdir)/rpmpopt
65 @ln -s rpm/rpmpopt $(DESTDIR)/$(libdir)/rpmpopt
66 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/BUILD
67 @case "@build_cpu@" in \
68 *86) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/i386 ;;\
69 alpha*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/alpha ;;\
70 sparc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc;\
71 $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/sparc64 ;;\
72 powerpc*) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/ppc ;;\
74 @case "@build_os@" in \
75 mint) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/m68kmint ;;\
76 *) $(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/@build_cpu@ ;;\
78 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/RPMS/noarch
79 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SOURCES
80 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SPECS
81 @$(mkinstalldirs) $(DESTDIR)/$(prefix)/src/redhat/SRPMS
82 @$(mkinstalldirs) $(DESTDIR)/var/tmp
86 rm -rf /tmp/rpm-$(VERSION)
87 $(MAKE) DESTDIR=/tmp/rpm-$(VERSION) install
88 cd /tmp/rpm-$(VERSION) ; tar cvf /tmp/rpm-$(VERSION).tar .
92 find . -name "Makefile" -exec rm {} \;
93 rm -f *gz *rpm config.*
97 @cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \
99 echo "==> Please resolve differences between the repository and" ; \
100 echo "==> your rpm check out before tagging." ; \
106 @cvs -d `cat CVS/Root` -Q tag -F $(CVSTAG) .
109 @echo "The final archive is ./rpm-$(VERSION).tar.gz."
112 nextsrpm: all archive
113 @sudo ./rpm -ta rpm-$(VERSION).tar.gz