-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
32 lines (24 loc) · 878 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
#
# hand-built makefile
#
NAME = rpmgrill
SPECFILE = $(NAME).spec
VERSION = $(shell git describe --abbrev=0)
RELEASE = $(shell rpm -q --specfile $(SPECFILE) --queryformat '%{RELEASE}')
# Magic tag thingy for building
DIST = fc24
$(VERSION).tar.gz:
@rm -rf $(NAME)-$(VERSION)
git archive --prefix=$(NAME)-$(VERSION)/ -o $(VERSION).tar.gz HEAD
$(NAME)-$(VERSION)-$(RELEASE).src.rpm: $(VERSION).tar.gz
rpmbuild -bs --nodeps --define "_sourcedir ." --define "_srcrpmdir ." --define "dist .$(DIST)" $(SPECFILE)
.PHONY: dockertest
dockertest: dev-tools/docker/docker-compose.yml
for target in `egrep -o '^test_\w+' $<`; do \
docker-compose -f $< build $$target; \
docker-compose -f $< run $$target /usr/bin/prove -lrcf t || exit 1; \
done
# Shortcut names for the above
.PHONY: tarball srpm
tarball: $(VERSION).tar.gz
srpm: $(NAME)-$(VERSION)-$(RELEASE).src.rpm