source: projects/mkkpkg/trunk/Makefile @ 6587

Revision 6587, 861 bytes checked in by daisuke, 10 years ago (diff)

kernel 3.x support

Line 
1NAME=mkkpkg
2DESTDIR=
3VERSION=$(shell awk '/Version: / { print $$2 }' $(NAME)-vl.spec)
4
5install:
6        install -d $(DESTDIR)/usr/sbin
7        install -p -m 0755 mkkpkg $(DESTDIR)/usr/sbin
8        install -d $(DESTDIR)/usr/share/mkkpkg
9        install -p -m 0755 parsespec $(DESTDIR)/usr/share/mkkpkg
10
11clean:
12        @rm -f *~
13
14version:
15        @perl -pi -e "s/^MKKPKGVERSION=.*/MKKPKGVERSION=$(VERSION)/" mkkpkg
16        @perl -pi -e "s/^Version.*/Version: $(VERSION)/" mkkpkg-vl.spec
17
18tarbz2: version clean
19        cd .. && cp -arf trunk $(NAME)-$(VERSION)
20        cd .. && tar --exclude .svn -cjf $(NAME)-$(VERSION).tar.bz2 $(NAME)-$(VERSION)
21        mkdir -p ~/rpm/SOURCES/$(NAME)/
22        cp ../$(NAME)-$(VERSION).tar.bz2 ~/rpm/SOURCES/$(NAME)/
23        cd .. && rm -rf $(NAME)-$(VERSION)
24
25srpm: tarbz2
26        cd .. && rpm -ts $(NAME)-$(VERSION).tar.bz2
27
28rpm: tarbz2
29        cd .. && rpm -ta $(NAME)-$(VERSION).tar.bz2 --clean
30
31debug:
32        /bin/sh -n mkkpkg
33
Note: See TracBrowser for help on using the repository browser.