head	1.2;
access;
symbols
	RPM_2_2:1.1.1.5
	RPM_2_1_2:1.1.1.4
	RPM_2_1:1.1.1.3
	RPM_2_0_11:1.1.1.2
	RPM_2_0:1.1.1.1
	RPM:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2003.08.24.11.57.45;	author rse;	state dead;
branches;
next	1.1;

1.1
date	96.03.05.16.16.57;	author rse;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.03.05.16.16.57;	author rse;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	96.06.04.22.06.37;	author rse;	state Exp;
branches;
next	1.1.1.3;

1.1.1.3
date	96.07.10.20.51.18;	author rse;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	96.07.12.02.37.46;	author rse;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	96.07.16.16.54.52;	author rse;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Resolve: RPM 2.2 -> RPM 2.2.11
@
text
@### These are variables meant to be exported

WARNINGS = -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes 
#DEBUG = -g
OPTS = -O2
CFLAGS = $(WARNINGS) $(DEBUG) $(OPTS) -Ilib -Ibuild -I../lib -I../build
LDFLAGS = $(DEBUG) -Llib -Lbuild -L../lib -L../build
#LIBEFENCE = -lefence
AR = ar r
RANLIB = ranlib

VERSION=2.0

prefix=$(ROOT)/usr

BINDIR=$(prefix)/bin
RPMBINDIR=$(subst usr/bin,bin,$(BINDIR))
MANDIR=$(prefix)/man/man8
LIBDIR=$(prefix)/lib
INCDIR=$(prefix)/include/rpm
ETCDIR=$(ROOT)/etc
PGPDIR=$(LIBDIR)/rpm

.EXPORT_ALL_VARIABLES:

### End exported variables
# -----------------------------------------------------------------------

SUBDIRS = lib build tools
OBJS = query.o install.o verify.o checksig.o ftp.o
PROGS = rpm rpmconvert rpm2cpio
LOADLIBES = -lbuild -lrpm -ldb /usr/lib/libgz.a $(LIBEFENCE)

ifeq (.depend,$(wildcard .depend))
TARGET=everything
else
TARGET=depend everything
endif

all: $(TARGET)

rpm: lib/librpm.a build/libbuild.a rpm.o
	$(CC) -o rpm -static $(LDFLAGS) rpm.o $(OBJS) $(LOADLIBES)
	$(CC) -o rpm.shared $(LDFLAGS) rpm.o $(OBJS) $(LOADLIBES)

rpm.o: rpm.c query.h install.h lib/rpmlib.h Makefile
	$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c rpm.c

everything: make-subdirs $(PROGS)

rpmconvert: lib/librpm.a convertdb.o
	gcc $(DEBUG) -o rpmconvert convertdb.o lib/librpm.a -ldb -lgdbm 
	
make-subdirs:
	for d in $(SUBDIRS); do \
		(cd $$d; $(MAKE)) ;\
	done

$(PROGS): $(OBJS)

install: all
	install -m 755 -o 0 -g 0 -d $(RPMBINDIR)
	install -m 755 -o 0 -g 0 -d $(BINDIR)
	install -m 755 -o 0 -g 0 -d $(MANDIR)
	install -m 755 -o 0 -g 0 -d $(ETCDIR)
	install -s -m 755 -o 0 -g 0 rpm $(RPMBINDIR)
	install -s -m 755 -o 0 -g 0 rpmconvert $(BINDIR)
	install -m 755 -o 0 -g 0 gendiff $(BINDIR)
	install -m 755 -o 0 -g 0 rpm2cpio $(BINDIR)
	install -m 644 -o 0 -g 0 rpm.8 $(MANDIR)
	if [ ! -f $(ETCDIR)/rpmrc ]; then \
		install -m 644 -o 0 -g 0 rpmrc $(ETCDIR)/rpmrc; \
	fi
	(cd lib; make LIBDIR=$(LIBDIR) INCDIR=$(INCDIR) install)
	install -m 755 -o 0 -g 0 -d $(PGPDIR)
	install -m 600 pubring.pgp $(PGPDIR)
	install -m 444 RPM-PGP-KEY $(PGPDIR)
	touch $(PGPDIR)/config.txt

clean:
	for d in $(SUBDIRS); do \
		(cd $$d; $(MAKE) $@@) ;\
	done
	rm -f *.a *.o core *~ $(PROGS)

depend:
	$(CPP) $(CFLAGS) -M *.c > .depend
	for d in $(SUBDIRS); do \
		(cd $$d; $(MAKE) $@@) ;\
	done

co:
	co RCS/*,v
	for d in $(SUBDIRS); do \
		(cd $$d; co RCS/*,v) ;\
	done

archive: 
	@@echo " "
	@@echo "I hope you checked everything out and made sure it builds"
	@@echo "maybe someday Erik will get around to making that automatic."
	@@sleep 5
	@@rm -rf /tmp/rpm-$(VERSION)
	@@mkdir /tmp/rpm-$(VERSION)
	@@tar cSpf - * | (cd /tmp/rpm-$(VERSION); tar xSpf -)
	@@cd /tmp/rpm-$(VERSION); \
	    make clean; \
	    find . -name "RCS" -exec rm {} \;  ; \
	    find . -name ".depend" -exec rm {} \;  ; \
	    rm -f *gz *rpm
	@@cd /tmp; tar czSpf rpm-$(VERSION).tar.gz rpm-$(VERSION)
	@@rm -rf /tmp/rpm-$(VERSION)
	@@cp /tmp/rpm-$(VERSION).tar.gz .
	@@rm -f /tmp/rpm-$(VERSION).tar.gz 
	@@echo " "
	@@echo "The final archive is ./rpm-$(VERSION).tar.gz. You should run"
	@@echo "-n$(VERSION) RCS/*,v on all of the directories btw."

ifeq (.depend,$(wildcard .depend))
include .depend
endif
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import: RPM 2.0
@
text
@@


1.1.1.2
log
@Import: RPM 2.0.11
@
text
@d1 1
a1 1
# This stuff should be reasonably changeable
d3 1
a5 8
prefix=$(ROOT)/usr
#LIBEFENCE = -lefence

################################### Leave this stuff alone

### These are variables meant to be exported

WARNINGS = -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes 
d8 1
d11 4
a14 1
VERSION=2.0.11
a22 2
NLSDIR=$(prefix)/lib/locale
NLSPACKAGE=rpm
d29 2
a30 2
SUBDIRS = lib build tools po
OBJS = rpm.o query.o install.o verify.o checksig.o ftp.o
d32 1
a32 1
LOADLIBES = -lbuild -lrpm -ldb /usr/lib/libgz.a 
d42 3
a44 6
rpm: lib/librpm.a build/libbuild.a gettextstub.o $(OBJS)
	$(CC) -o rpm -static $(LDFLAGS) $(OBJS) $(LOADLIBES) -lintl $(LIBEFENCE)
	$(CC) -o rpm.shared $(LDFLAGS) $(OBJS) gettextstub.o $(LOADLIBES) $(LIBEFENCE)

rpm2cpio: lib/librpm.a rpm2cpio.o
	$(CC) -o rpm2cpio $(LDFLAGS) rpm2cpio.o $(LOADLIBES) -lintl
d47 1
a47 1
	$(CC) $(CFLAGS) -DNLSPACKAGE=\"$(NLSPACKAGE)\" -DNLSDIR=\"$(NLSDIR)\" -DVERSION=\"$(VERSION)\" -c rpm.c
d52 1
a52 1
	gcc $(DEBUG) $(LDFLAGS) -o rpmconvert convertdb.o lib/librpm.a -ldb -lgdbm 
a58 8
newtree:
	rm -f RCS
	ln -sf /usr/rhs/RCS/rpm-2.0 RCS
	for d in $(SUBDIRS); do \
		mkdir -p $$d ;\
		(cd $$d; rm -f RCS; ln -sf /usr/rhs/RCS/rpm-2.0/$$d RCS) ;\
	done

d69 1
a69 1
	install -s -m 755 -o 0 -g 0 rpm2cpio $(BINDIR)
a70 1
	install -m 644 -o 0 -g 0 rpm2cpio.8 $(MANDIR)
d75 4
a78 5
	(cd po; make LIBDIR=$(LIBDIR) INCDIR=$(INCDIR) install)
	#install -m 755 -o 0 -g 0 -d $(PGPDIR)
	#install -m 600 pubring.pgp $(PGPDIR)
	#install -m 444 RPM-PGP-KEY $(PGPDIR)
	#touch $(PGPDIR)/config.txt
d84 1
a84 1
	rm -f *.a *.o core *~ $(PROGS) rpm.shared
@


1.1.1.3
log
@Import: RPM 2.1
@
text
@a2 4
ifndef RPM_OPT_FLAGS
RPM_OPT_FLAGS = -O2
endif

d4 1
a4 1
OPTS = ${RPM_OPT_FLAGS}
d14 1
a14 1
LDFLAGS = $(DEBUG) -Llib -Lbuild -L../lib -L../build 
d17 1
a17 1
VERSION = 2.1
d64 2
a65 3
		(cd $$d; $(MAKE)) \
		  || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac;\
	done && test -z "$$fail"
d72 2
a73 3
		(cd $$d; rm -f RCS; ln -sf /usr/rhs/RCS/rpm-2.0/$$d RCS) \
		  || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac;\
	done && test -z "$$fail"
d135 1
a135 1
	@@echo "rcs -n$(VERSION): RCS/*,v on all of the directories btw."
@


1.1.1.4
log
@Import: RPM 2.1.2
@
text
@d21 1
a21 1
VERSION = 2.1.2
d40 1
a40 1
PROGS = rpm rpm2cpio
d63 3
d89 1
a108 1
	find . -name core -exec rm {} \;
d118 1
a118 1
	for d in $(SUBDIRS) docs; do \
@


1.1.1.5
log
@Import: RPM 2.2
@
text
@d21 1
a21 1
VERSION = 2.2
d29 1
a92 1
	install -m 644 -o 0 -g 0 usr.lib.rpmrc $(LIBDIR)/rpmrc
d95 4
@


