2 # Makefile for debianqueued -- only targets for package maintainance
4 # $Id: Makefile,v 1.10 1998/03/25 09:21:01 ftplinux Exp $
7 # Revision 1.10 1998/03/25 09:21:01 ftplinux
8 # Implemented snapshot target
10 # Revision 1.9 1998/03/23 14:10:28 ftplinux
11 # $$num in make upload needs braces because _ follows
13 # Revision 1.8 1997/12/16 13:20:57 ftplinux
14 # add _all to changes name in upload target
16 # Revision 1.7 1997/11/20 15:34:11 ftplinux
17 # upload target should copy only current release to queue dir
19 # Revision 1.6 1997/09/29 14:28:38 ftplinux
20 # Also fill in Version: for .changes file
22 # Revision 1.5 1997/09/25 11:33:48 ftplinux
23 # Added automatic adding of release number to ChangeLog
25 # Revision 1.4 1997/08/18 11:29:11 ftplinux
26 # Include new release number in message of cvs commits
28 # Revision 1.3 1997/08/12 10:39:08 ftplinux
29 # Added generation of .changes file in 'dist' target; added 'upload'
30 # target (using the queue :-)
32 # Revision 1.2 1997/08/12 10:01:32 ftplinux
33 # Fixed dist target to work (last checkin was needed to test it at all)
38 RELNUMFILE = release-num
39 # files that contain the release number
40 FILES_WITH_NUM = debianqueued dqueued-watcher
44 .PHONY: default release dist
47 @echo "Nothing to make -- the Makefile is only for maintainance purposes"
51 # make release (use number from file release-num)
53 # make release RELNUM=x.y (writes new number to release-num)
56 if cvs status $(RELNUMFILE) | grep -q Up-to-date; then true; else \
57 echo "$(RELNUMFILE) needs commit first"; exit 1; \
60 echo $(RELNUM) >$(RELNUMFILE)
61 cvs commit -m "Bumped release number to `cat $(RELNUMFILE)`" $(RELNUMFILE)
63 perl -pi -e "s/Release: \S+/Release: `cat $(RELNUMFILE)`/;" \
65 cvs commit -m "Bumped release number to `cat $(RELNUMFILE)`" $(FILES_WITH_NUM)
66 if grep -q "Version `cat release-num` released" ChangeLog; then true; else \
67 mv ChangeLog ChangeLog.orig; \
69 echo "-- Version `cat $(RELNUMFILE)` released" >>ChangeLog; \
70 echo "" >>ChangeLog; \
71 cat ChangeLog.orig >>ChangeLog; \
73 cvs commit -m "Bumped release number to `cat $(RELNUMFILE)`" ChangeLog; \
75 cvs tag release-`cat $(RELNUMFILE) | sed 's/\./-/'`
79 num=`cat $(RELNUMFILE)`; name=debianqueued-$$num; \
81 (cd tmp; cvs export -r release-`echo $$num | sed 's/\./-/'` $(MODULE); \
82 mv $(MODULE) $$name; \
83 tar cvf ../../$$name.tar $$name); \
84 gzip -9f ../$$name.tar; \
86 file=../$$name.tar.gz; \
87 md5=`md5sum $$file | awk -e '{print $$1}'`; \
88 size=`ls -l $$file | awk -e '{print $$4}'`; \
89 chfile=../debianqueued_`cat $(RELNUMFILE)`_all.changes; \
90 sed -e "s/^Date: .*/Date: `822-date`/" -e "s/Version: .*/Version: `cat $(RELNUMFILE)`/" <changes-template >$$chfile; \
91 echo " $$md5 $$size byhand - $$name.tar.gz" >>$$chfile; \
92 pgp -u 'Roman Hodek' +clearsig=on -fast <$$chfile >$$chfile.asc; \
93 mv $$chfile.asc $$chfile
95 # can only be used on ftp.uni-erlangen.de :-)
98 num=`cat $(RELNUMFILE)`; \
99 cp ../debianqueued-$$num.tar.gz ../debianqueued_$${num}_all.changes $$HOME/Linux/debian/UploadQueue
101 # make snapshot from current sources
104 modified=`cvs status 2>/dev/null | awk '/Status:/ { if ($$4 != "Up-to-date") print $$2 }'`; \
105 if [ "x$$modified" != "x" ]; then \
106 echo "There are modified files: $$modified"; \
107 echo "Commit first"; \
110 name=debianqueued-snapshot-`date +%y%m%d`; \
113 (cd tmp; cvs export -D now $(MODULE); \
114 mv $(MODULE) $$name; \
115 tar cvf ../../$$name.tar $$name); \
116 gzip -9f ../$$name.tar; \