source: projects/vutils/trunk/Makefile @ 9943

Revision 9943, 1.8 KB checked in by munepi, 7 years ago (diff)

Makefile: changed for git-svn

Line 
1NAME=vutils
2VERSION=$(shell awk '/Version:/ { print $$2 }' ${NAME}-vl.spec)
3TAG=$(NAME)-$(VERSION)
4
5BINS=setwm bzip2dir cpdir del gzipdir setime mkrpmdir vupgrade gsetime
6SBINS=setdm update-defaultfont gsetdm
7DESKTOPFILES=gsetime.desktop gsetdm.desktop
8LIBS=functions imelib vinelib
9
10BINDIR=/usr/bin
11SBINDIR=/usr/sbin
12LIBDIR=/usr/share/vine
13FONTDIR=/usr/share/fonts
14DESKTOPDIR=/usr/share/applications
15DESTDIR=
16
17SUBDIR=xinitrc.d
18
19install:
20        install -d ${DESTDIR}/${BINDIR}
21        install -m 755 ${BINS} ${DESTDIR}/${BINDIR}
22        install -d ${DESTDIR}/${SBINDIR}
23        install -m 755 ${SBINS} ${DESTDIR}/${SBINDIR}
24        install -d ${DESTDIR}/${LIBDIR}
25        install -m 755 ${LIBS} ${DESTDIR}/${LIBDIR}
26        install -d ${DESTDIR}/${DESKTOPDIR}
27        install -m 644 ${DESKTOPFILES} ${DESTDIR}/${DESKTOPDIR}
28        install -d ${DESTDIR}/${LIBDIR}/fonts.d/
29        install -m 644 update-defaultfont.txt ${DESTDIR}/${LIBDIR}/fonts.d/
30        install -d ${DESTDIR}/${FONTDIR}/alias/TrueType
31        for i in ${SUBDIR}; do \
32                make install -C $$i ;\
33        done
34
35version:
36        perl -p -i -e "s/^Version.*/Version: $(VERSION)/" ${NAME}-vl.spec
37
38tag:
39        if [ ! -d ../tags/$(TAG) ] ;then \
40                svn copy ../trunk ../tags/$(TAG) ;\
41                svn commit -m "tagging as $(TAG)" ../tags/$(TAG) ;\
42                echo "Tagged as $(TAG)" ;\
43        fi
44
45tarbz2: clean version
46        cd .. && rm -rf $(TAG)
47        cd .. && \
48          if [ -d trunk ]; then cp -arf trunk $(TAG); else cp -arf ${NAME} $(TAG); fi
49        cd .. && \
50            tar --exclude=".svn" --exclude=".git" \
51              -cjvf ${NAME}-${VERSION}.tar.bz2 $(TAG)
52        @if [ -d ~/rpm/SOURCES/${NAME} ]; then \
53                mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/${NAME}; \
54        else \
55                mkdir -p ~/rpm/SOURCES/${NAME}; \
56                mv ../${NAME}-${VERSION}.tar.bz2 ~/rpm/SOURCES/${NAME}; \
57        fi
58        rm -rf ../$(TAG)
59
60srpm: tarbz2
61        rpmbuild -bs ${NAME}-vl.spec
62
63rpm: tarbz2
64        rpmbuild -ba ${NAME}-vl.spec
65
66clean:
67        rm -fr *~
Note: See TracBrowser for help on using the repository browser.