forked from QubesOS/qubes-installer-qubes-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
90 lines (77 loc) · 2.61 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#
# The Qubes OS Project, http://www.qubes-os.org
#
# Copyright (C) 2011 Tomasz Sterna <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
ISO_INSTALLER ?= 1
ISO_LIVEUSB ?= 0
PUNGI_OPTS := --nosource --nodebuginfo --nogreedy --all-stages
ifdef QUBES_RELEASE
ISO_VERSION := $(QUBES_RELEASE)
PUNGI_OPTS += --isfinal
else
ISO_VERSION := $(shell date +%Y%m%d)
endif
PUNGI_OPTS += --ver="$(ISO_VERSION)"
INSTALLER_KICKSTART ?= $(PWD)/conf/qubes-kickstart.cfg
LIVE_KICKSTART ?= $(PWD)/conf/liveusb.ks
help:
@echo "make iso <== \o/";\
echo; \
echo "make clean";\
echo; \
exit 0;
.PHONY: clean clean-repos iso iso-prepare iso-installer iso-liveusb
ifeq ($(ISO_INSTALLER),1)
iso: iso-installer
endif
ifeq ($(ISO_LIVEUSB),1)
iso: iso-liveusb
endif
iso-prepare:
ln -nsf `pwd` /tmp/qubes-installer
createrepo -q -g ../../conf/comps-qubes.xml --update yum/qubes-dom0
iso-installer: iso-prepare
mkdir -p work
pushd work && pungi --name=Qubes $(PUNGI_OPTS) -c $(INSTALLER_KICKSTART) && popd
# Move result files to known-named directories
mkdir -p build/ISO/qubes-x86_64/iso
mv work/$(ISO_VERSION)/x86_64/iso/*-DVD*.iso build/ISO/qubes-x86_64/iso/
rm -rf build/work
mv work build/work
chown --reference=Makefile -R build yum
rm -rf work
iso-liveusb: $(LIVE_KICKSTART) iso-prepare
mkdir -p work
pushd work && ../livecd-creator-qubes --debug --product='Qubes OS' --title="Qubes OS $(ISO_VERSION)" --fslabel="Qubes-$(ISO_VERSION)-x86_64-LIVE" --config $(LIVE_KICKSTART) && popd
# Move result files to known-named directories
mkdir -p build/ISO/qubes-x86_64/iso build/work
mv work/*.iso build/ISO/qubes-x86_64/iso/
chown --reference=Makefile -R build yum
rm -rf work
clean-repos:
@echo "--> Removing old rpms from the installer repos..."
@(cd yum && ./clean_repos.sh)
clean:
sudo rm -fr build/*
ifeq ($(ISO_LIVEUSB),1)
get-sources:
$(MAKE) -C livecd-tools get-sources
verify-sources:
$(MAKE) -C livecd-tools verify-sources
endif