-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (30 loc) · 932 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
TARGETS = jamendo-fuse
.PHONY: all $(TARGETS)
all: $(TARGETS)
MAKE_OPTS = --no-print-directory
.PHONY: jamendo-fuse
jamendo-fuse:
@echo "Building: jamendo-fuse"
@$(MAKE) $(MAKE_OPTS) -C src/
.PHONY: rpm
rpm:
@echo "Building: rpm"
ifeq ($(wildcard ~/rpmbuild/),)
@echo "***"
@echo "*** ~/rpmbuild not found, create with"
@echo "***"
@echo "*** mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}"
@echo "***"
@false
else
@version=$$(git describe | tail -c +2); echo "Building $${version}"; \
git archive --prefix=jamendo-fuse-$${version%%-*}/ -o ~/rpmbuild/SOURCES/jamendo-fuse-$${version%%-*}.tar HEAD; \
git describe | tail -c +2 > .version; \
tar -rf ~/rpmbuild/SOURCES/jamendo-fuse-$${version%%-*}.tar --transform "s,^,jamendo-fuse-$${version%%-*}/," .version
@rpmbuild -bb jamendo-fuse.spec
endif
.PHONY: clean
clean:
@echo "Cleaning: $(TARGETS)"
@$(MAKE) $(MAKE_OPTS) -C src/ clean
@rm -f .version