source: projects/vskel/trunk/Makefile @ 4043

Revision 4043, 1.8 KB checked in by daisuke, 11 years ago (diff)
Line 
1NAME=vskel
2SPEC=etcskel-vl.spec
3VERSION=$(shell awk '/%define version/ { print $$3 }' ${SPEC})
4TAG=$(NAME)-$(VERSION)
5
6DESTDIR=
7FILES=.Xresources .bash_logout .bash_profile .bashrc \
8        .cshrc .zshrc .rpmmacros
9
10install: mkrpmdir emacs vje wnn7 gnupg ssh vine
11        install -d ${DESTDIR}/etc/skel
12        install -m 644 ${FILES} ${DESTDIR}/etc/skel
13
14vje:
15        install -d ${DESTDIR}/etc/skel/.vje
16        install -m 644 .vje/general.key ${DESTDIR}/etc/skel/.vje
17
18wnn7:
19        install -d ${DESTDIR}/etc/skel/.Wnn7
20        install -m 644 .Wnn7/{uumrc,uumkey} ${DESTDIR}/etc/skel/.Wnn7
21
22gnupg:
23        install -m 700 -d ${DESTDIR}/etc/skel/.gnupg
24
25ssh:
26        install -m 700 -d ${DESTDIR}/etc/skel/.ssh
27
28emacs:
29        install -d ${DESTDIR}/etc/skel/.emacs.d
30        install -m 664 .emacs.d/{init,emacs23-vine-default}.el ${DESTDIR}/etc/skel/.emacs.d/
31
32vine:
33        install -d ${DESTDIR}/etc/skel/.vine
34
35xemacs:
36        install -d ${DESTDIR}/etc/skel/.xemacs
37        install -m 644 .xemacs/init.el ${DESTDIR}/etc/skel/.xemacs
38
39mkrpmdir:
40        mkdir -p ${DESTDIR}/etc/skel/rpm/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
41        mkdir -p ${DESTDIR}/etc/skel/rpm/RPMS/{i386,i586,i686,athlon,noarch,arm,ppc}
42
43tag:
44        if [ ! -d ../tags/$(TAG) ] ;then \
45                svn copy ../trunk ../tags/$(TAG) ;\
46                svn commit -m "tagging as $(TAG)" ../tags/$(TAG) ;\
47                echo "Tagged as $(TAG)" ;\
48        fi
49
50targz: clean
51        cd .. && rm -rf ${NAME}-${VERSION}
52        cd .. && cp -arf trunk ${NAME}-${VERSION}
53        cd .. && tar --exclude CVS -cf - ${NAME}-${VERSION} | gzip -9 > ${NAME}-${VERSION}.tar.gz
54        rm -rf ../${NAME}-${VERSION}
55
56tarbz2: clean
57        cd .. && rm -rf ${NAME}-${VERSION}
58        cd .. && cp -arf trunk ${NAME}-${VERSION}
59        cd .. && tar --exclude CVS -cf - ${NAME}-${VERSION} | bzip2 -9 > ${NAME}-${VERSION}.tar.bz2
60        mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/
61        rm -rf ../${NAME}-${VERSION}
62
63srpm: tarbz2
64        rpmbuild -bs ${SPEC}
65
66rpm: tarbz2
67        rpmbuild -ba ${SPEC}
68
69clean:
70        rm -fr *~ .*???~
Note: See TracBrowser for help on using the repository browser.