Line | |
---|
1 | NAME=libaio |
---|
2 | SPECFILE=$(NAME).spec |
---|
3 | VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE)) |
---|
4 | RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE)) |
---|
5 | CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE)) |
---|
6 | RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm") |
---|
7 | |
---|
8 | prefix=/usr |
---|
9 | includedir=$(prefix)/include |
---|
10 | libdir=$(prefix)/lib |
---|
11 | |
---|
12 | default: all |
---|
13 | |
---|
14 | all: |
---|
15 | @$(MAKE) -C src |
---|
16 | |
---|
17 | install: all |
---|
18 | |
---|
19 | clean: |
---|
20 | @$(MAKE) -C src clean |
---|
21 | @$(MAKE) -C harness clean |
---|
22 | |
---|
23 | tag-archive: |
---|
24 | @cvs -Q tag -F $(CVSTAG) |
---|
25 | |
---|
26 | create-archive: tag-archive |
---|
27 | @rm -rf /tmp/$(NAME) |
---|
28 | @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(NAME) || echo GRRRrrrrr -- ignore [export aborted] |
---|
29 | @mv /tmp/$(NAME) /tmp/$(NAME)-$(VERSION) |
---|
30 | @cd /tmp; tar czSpf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) |
---|
31 | @rm -rf /tmp/$(NAME)-$(VERSION) |
---|
32 | @cp /tmp/$(NAME)-$(VERSION).tar.gz . |
---|
33 | @rm -f /tmp/$(NAME)-$(VERSION).tar.gz |
---|
34 | @echo " " |
---|
35 | @echo "The final archive is ./$(NAME)-$(VERSION).tar.gz." |
---|
36 | |
---|
37 | archive: clean tag-archive create-archive |
---|
38 | |
---|
39 | srpm: create-archive |
---|
40 | $(RPMBUILD) --define "_sourcedir `pwd`" --define "_srcrpmdir `pwd`" --nodeps -bs $(SPECFILE) |
---|
Note: See
TracBrowser
for help on using the repository browser.