blob: b82c65f02c43fb393c6c22dbf08538276d8dd2e1 (
plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
|
GFS_TAR = ../../glusterfs-$(VERSION).tar.gz
.PHONY: all
all:
@echo "To build RPMS run 'make glusterrpms'"
.PHONY: glusterrpms prep srcrpm testsrpm clean
glusterrpms: prep srcrpm rpms
-rm -rf rpmbuild
prep:
if [ ! -e $(GFS_TAR) ]; then \
$(MAKE) -C ../.. dist; \
fi
-mkdir -p rpmbuild/BUILD
-mkdir -p rpmbuild/SPECS
-mkdir -p rpmbuild/RPMS
-mkdir -p rpmbuild/SRPMS
-mkdir -p rpmbuild/SOURCES
-rm -rf rpmbuild/SOURCES/*
cp ../../*.tar.gz ./rpmbuild/SOURCES
cp ../../glusterfs.spec ./rpmbuild/SPECS
srcrpm:
rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bs rpmbuild/SPECS/glusterfs.spec
mv rpmbuild/SRPMS/* .
rpms:
rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bb rpmbuild/SPECS/glusterfs.spec
mv rpmbuild/RPMS/*/* .
# EPEL-5 does not like new versions of rpmbuild and requires some
# _source_* defines
testsrpm: prep
rpmbuild --define '_topdir $(shell pwd)/rpmbuild' \
--define '_source_payload w9.gzdio' \
--define '_source_filedigest_algorithm 1' \
-bs rpmbuild/SPECS/glusterfs.spec
mv rpmbuild/SRPMS/* ../..
-rm -rf rpmbuild
clean:
-rm -rf rpmbuild
-rm -f *.rpm
|