blob: 33c98a95b6b2fedf3f6d70ce7eeb8cef2f30a6af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
PACKAGE = rapid-tunneling
SPEC = rapid-tunneling.spec
SOURCES = rapid-tunneling rapid-tunneling-status
VER = $(shell awk '/^Version: / {print $$2}' $(SPEC)| head -n 1)
REL = $(shell awk '/^Release: / {print $$2}' $(SPEC)| head -n 1)
all: rpm
rpm: $(SPEC) SOURCES/$(PACKAGE)-$(VER).tar.gz
mkdir -p BUILD RPMS SOURCES SRPMS
[ -e SPECS ] || ln -s . SPECS
cd SPECS; rpmbuild --target noarch --define "_topdir $(PWD)" -ba $(SPEC)
SOURCES/$(PACKAGE)-%.tar.gz: $(SOURCES)
tar czf $@ --transform 's|^|$(PACKAGE)-$(VER)/|' $^
|