/[gentoo-src]/keychain/Makefile
Gentoo

Contents of /keychain/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Sat Jan 8 01:57:23 2005 UTC (9 years, 3 months ago) by agriffis
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +14 -10 lines
- Makefile modifications to include only SYNOPSIS and OPTIONS in --help
- Add --inherit and --noinherit
- Make --inherit local-once the new default behavior
- Add parameters to --stop: all, others, mine
- Change default behavior so keychain doesn't stop other ssh-agents
  unless "--stop others" is specified

1 V:=$(shell /bin/sh keychain.sh --version 2>&1 | \
2 awk -F'[ ;]' '/^K/{print $$2; exit}')
3 D:=$(shell date +'%d %b %Y')
4 TARBALL_CONTENTS=keychain README ChangeLog COPYING keychain.pod keychain.1 \
5 keychain.spec
6
7 all: keychain.1 keychain keychain.spec
8
9 keychain.spec: keychain.spec.in keychain.sh
10 sed 's/KEYCHAIN_VERSION/$V/' keychain.spec.in > keychain.spec
11
12 keychain.1: keychain.pod keychain.sh
13 pod2man --name=keychain --release=$V \
14 --center='http://gentoo.org/proj/en/keychain.xml' \
15 keychain.pod keychain.1
16 sed -i "s/^'br/.br/" keychain.1
17
18 keychain: keychain.sh keychain.txt
19 perl -e '\
20 open P, "keychain.txt" or die "cant open keychain.txt"; \
21 while (<P>) { \
22 $$printing = 0 if /^\w/; \
23 $$printing = 1 if /^(SYNOPSIS|OPTIONS)/; \
24 $$printing || next; \
25 s/\$$/\\\$$/g; \
26 s/\`/\\\`/g; \
27 s/\\$$/\\\\/g; \
28 s/\*(\w+)\*/\$${CYAN}$$1\$${OFF}/g; \
29 s/(^|\s)(-+[-\w]+)/$$1\$${GREEN}$$2\$${OFF}/g; \
30 $$pod .= $$_; \
31 }; \
32 open B, "keychain.sh" or die "cant open keychain.sh"; \
33 $$/ = undef; \
34 $$_ = <B>; \
35 s/INSERT_POD_OUTPUT_HERE\n/$$pod/ || die; \
36 print' >keychain
37 chmod +x keychain
38
39 keychain.txt: keychain.pod
40 pod2text keychain.pod keychain.txt
41
42 keychain-$V.tar.gz: $(TARBALL_CONTENTS)
43 @case $V in *-test) \
44 echo "**** Version is $V, please remove -test"; \
45 exit 1 ;; \
46 esac
47 @if ! grep -qF '* keychain $V ' ChangeLog; then \
48 echo "**** Need to update the ChangeLog for version $V"; \
49 exit 1; \
50 fi
51 @if ! grep -qF 'Keychain $V ' README; then \
52 echo "**** Need to update the README for version $V"; \
53 exit 1; \
54 fi
55 mkdir keychain-$V
56 cp $(TARBALL_CONTENTS) keychain-$V
57 sudo chown -R root:root keychain-$V
58 /bin/tar cjvf keychain-$V.tar.bz2 keychain-$V
59 sudo rm -rf keychain-$V
60 ls -l keychain-$V.tar.bz2
61
62 # Building noarch.rpm builds src.rpm at the same time. I haven't
63 # found an elegant way yet to prevent parallel builds from messing
64 # this up, so all deps in the Makefile refer only to noarch.rpm
65 keychain-$V-1.noarch.rpm: keychain-$V.tar.gz
66 rpmbuild -ta keychain-$V.tar.bz2
67 mv ~/redhat/RPMS/noarch/keychain-$V-1.noarch.rpm \
68 ~/redhat/SRPMS/keychain-$V-1.src.rpm .
69 rpm --addsign keychain-$V-1.noarch.rpm keychain-$V-1.src.rpm
70
71 .PHONY: webpage
72 webpage:
73 perl -0777i.bak -pe '\
74 BEGIN{open F, "ChangeLog"; local $$/=undef; \
75 ($$C=<F>) =~ s/^.*?\n\n//s; \
76 $$C =~ s/&/&amp;/g; \
77 $$C =~ s/</&lt;/g; \
78 $$C =~ s/>/&gt;/g; }; \
79 s/(<version>).*?(?=<.version>)/$${1}$V/; \
80 s/(<date>).*?(?=<.date>)/$${1}$D/; \
81 s/(keychain-)[\d.]+(?=\.tar|\S*rpm)/$${1}$V/g; \
82 s/(<!-- begin automatic ChangeLog insertion -->).*?(?=<!-- end)/$${1}$$C/s;' \
83 ~/gentoo/xml/htdocs/proj/en/keychain/index.xml
84 cd ~/gentoo/xml/htdocs/proj/en/keychain && \
85 cvs commit -m 'update to $V' index.xml
86
87 .PHONY: mypage
88 mypage: keychain-$V.tar.gz keychain-$V-1.noarch.rpm
89 rsync -vPe ssh keychain-$V.tar.bz2 ChangeLog \
90 keychain-$V-1.noarch.rpm keychain-$V-1.src.rpm \
91 gentoo:public_html/keychain/
92 ssh gentoo make -C public_html/keychain
93
94 .PHONY: release
95 release: mypage webpage
96 rsync -vPe ssh keychain-$V.tar.bz2 gentoo:/space/distfiles-local/
97
98 .PHONY: clean
99 clean:
100 rm -f keychain keychain.txt keychain.1 keychain.spec

  ViewVC Help
Powered by ViewVC 1.1.20