source: projects/rootfiles/trunk/Makefile @ 4140

Revision 4140, 997 bytes checked in by daisuke, 13 years ago (diff)

rootfiles: fix Makefile

Line 
1DESTDIR=
2NAME=rootfiles-vine
3DATE:=$(shell date +'%Y%m%d')
4PWD:=$(shell pwd)
5EXCLUDE= Makefile rootfiles-vl.spec
6
7VERSION := $(shell awk '/Version:/ { print $$2 }' rootfiles-vl.spec)
8RELEASE := $(shell awk '/Release:/ { print $$2 }' rootfiles-vl.spec)
9TAG=$(NAME)-$(VERSION)
10
11install:
12        mkdir -p ${DESTDIR}/root
13        tar --exclude Makefile --exclude rootfiles-vl.spec -cvf - . \
14        | (cd ${DESTDIR}/root ; tar -xf -)
15
16rpm: tarbz2
17        rpm -ba rootfiles-vl.spec
18
19tarbz2: clean
20        if [ -d ../${NAME}-${VERSION} ]; then rm -rf ../${NAME}-${VERSION} ;fi
21        cd .. && cp -a ${PWD} ${NAME}-${VERSION}
22        cd .. && tar --exclude .svn -cjf ${NAME}-${VERSION}.tar.bz2 ${NAME}-${VERSION}
23        cp -f ../${NAME}-${VERSION}.tar.bz2 $(shell rpm --eval %{_sourcedir})/
24        if [ -d ../${NAME}-${VERSION} ]; then rm -rf ../${NAME}-${VERSION} ;fi
25
26tag:
27        if [ ! -d ../tags/$(TAG) ] ;then \
28                svn copy ../trunk ../tags/$(TAG) ;\
29                svn commit -m "tagging as $(TAG)" ../tags/$(TAG) ;\
30                echo "Tagged as $(TAG)" ;\
31        fi
32
33clean:
34        rm -fv *~ .*.swp
35
Note: See TracBrowser for help on using the repository browser.