forked from xenserver/buildroot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (34 loc) · 1.05 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
DIST := .el6
.PHONY: all rpms srpms
all: rpms
# RPM build rules
%.src.rpm:
@echo [RPMBUILD] $@
@rpmbuild --quiet --define "_topdir ." --define "%dist $(DIST)" -bs $<
@echo [CREATEREPO] $@
@flock --timeout 30 ./SRPMS createrepo --quiet --update ./SRPMS
%.rpm:
@echo [MOCK] $@
@mock --configdir=mock --quiet -r xenserver --resultdir=$(dir $@) --uniqueext=$(notdir $@) --rebuild $<
@echo [CREATEREPO] $@
@flock --timeout 30 ./RPMS createrepo --quiet --update ./RPMS
# Deb build rules
%.dsc:
@echo [MAKEDEB] $@
@scripts/deb/makedeb.py $<
@echo [UPDATEREPO] $@
@flock --timeout 30 ./SRPMS scripts/deb/updaterepo sources SRPMS
%.deb:
@echo [COWBUILDER] $@
@mkdir -p logs
@touch RPMS/Packages
@sudo cowbuilder --build \
--configfile pbuilder/pbuilderrc \
--buildresult RPMS $<
@echo [UPDATEREPO] $@
@flock --timeout 30 ./RPMS scripts/deb/updaterepo packages RPMS
# Dependency build rules
deps: SPECS/*.spec specdep.py scripts/lib/mappkgname.py
@echo Updating dependencies...
@./specdep.py -d $(DIST) -i libnl3 SPECS/*.spec > $@
-include deps