2011-03-31 13:47:30 +00:00
|
|
|
#
|
|
|
|
# The Qubes OS Project, http://www.qubes-os.org
|
|
|
|
#
|
|
|
|
# Copyright (C) 2011 Tomasz Sterna <tomek@xiaoka.com>
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
TOP := $(shell pwd)
|
|
|
|
RPMBUILD_DEFINES := --define "_rpmdir rpm/" --define "_sourcedir $(TOP)/rpm/SOURCES"
|
|
|
|
|
|
|
|
spec_version = $(shell sed -n '/^Version:/s/.*:[ \t]\+//p' $(1))
|
|
|
|
package = $(shell \
|
2012-07-09 13:04:37 +00:00
|
|
|
mkdir -p rpm/SOURCES; \
|
2011-03-31 13:47:30 +00:00
|
|
|
cd rpm/SOURCES; \
|
|
|
|
rm -f $(1)-$(2)*; \
|
|
|
|
ln -s ../../$(1) $(1)-$(2); \
|
|
|
|
tar jcf $(1)-$(2).tar.bz2 --dereference --exclude-vcs $(1)-$(2); \
|
|
|
|
rm $(1)-$(2) )
|
|
|
|
|
|
|
|
ANACONDA_VERSION := $(call spec_version,anaconda/anaconda.spec)
|
|
|
|
FIRSTBOOT_VERSION := $(call spec_version,firstboot/firstboot.spec)
|
|
|
|
QBSLOGOS_VERSION := $(call spec_version,qubes-logos/qubes-logos.spec)
|
|
|
|
QBSRELEASE_VERSION := $(call spec_version,qubes-release/qubes-release.spec)
|
|
|
|
REVISOR_VERSION := $(call spec_version,revisor/revisor.spec)
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "make rpms <--- make all rpms and sign them";\
|
|
|
|
echo "make rpms_anaconda <--- create binary rpms for Anaconda"; \
|
|
|
|
echo "make rpms_firstboot <--- create binary rpms for Firstboot"; \
|
|
|
|
echo "make rpms_logos <--- create binary rpms for Qubes Logos package"; \
|
|
|
|
echo "make rpms_release <--- create binary rpms for Qubes Release package"; \
|
|
|
|
echo "make rpms_revisor <--- create binary rpms for Revisor"; \
|
|
|
|
echo; \
|
2011-03-31 14:09:42 +00:00
|
|
|
echo "make update-repo <-- copy newly generated rpms to installer yum repo";\
|
2011-04-01 16:58:29 +00:00
|
|
|
echo "make iso <== \o/";\
|
2011-04-04 18:05:40 +00:00
|
|
|
echo; \
|
|
|
|
echo "make clean";\
|
|
|
|
echo; \
|
2011-03-31 13:47:30 +00:00
|
|
|
exit 0;
|
|
|
|
|
|
|
|
.PHONY: rpms rpms_anaconda rpms_firstboot rpms_logos rpms_release rpms_revisor \
|
|
|
|
update-repo update-repo-testing clean
|
|
|
|
|
2012-07-09 11:46:03 +00:00
|
|
|
rpms: rpms_anaconda rpms_firstboot rpms_logos rpms_release rpms_revisor
|
2011-03-31 14:09:42 +00:00
|
|
|
rpm --addsign `ls -d rpm/x86_64/*.rpm rpm/i686/*.rpm rpm/noarch/*.rpm 2>/dev/null`
|
2011-03-31 13:47:30 +00:00
|
|
|
|
2011-03-31 14:09:42 +00:00
|
|
|
rpm/SOURCES/anaconda-$(ANACONDA_VERSION).tar.bz2: anaconda anaconda/anaconda.spec
|
2011-03-31 13:47:30 +00:00
|
|
|
$(call package,anaconda,$(ANACONDA_VERSION))
|
|
|
|
|
2011-03-31 14:09:42 +00:00
|
|
|
rpm/SOURCES/firstboot-$(FIRSTBOOT_VERSION).tar.bz2: firstboot firstboot/firstboot.spec
|
2011-03-31 13:47:30 +00:00
|
|
|
$(call package,firstboot,$(FIRSTBOOT_VERSION))
|
|
|
|
|
2011-03-31 14:09:42 +00:00
|
|
|
rpm/SOURCES/qubes-logos-$(QBSLOGOS_VERSION).tar.bz2: qubes-logos qubes-logos/qubes-logos.spec
|
2011-03-31 13:47:30 +00:00
|
|
|
$(call package,qubes-logos,$(QBSLOGOS_VERSION))
|
|
|
|
|
2011-03-31 14:09:42 +00:00
|
|
|
rpm/SOURCES/qubes-release-$(QBSRELEASE_VERSION).tar.bz2: qubes-release qubes-release/qubes-release.spec
|
2011-03-31 13:47:30 +00:00
|
|
|
$(call package,qubes-release,$(QBSRELEASE_VERSION))
|
|
|
|
|
|
|
|
rpms_anaconda: rpm/SOURCES/anaconda-$(ANACONDA_VERSION).tar.bz2
|
|
|
|
rpmbuild $(RPMBUILD_DEFINES) -bb anaconda/anaconda.spec
|
|
|
|
|
|
|
|
rpms_firstboot: rpm/SOURCES/firstboot-$(FIRSTBOOT_VERSION).tar.bz2
|
|
|
|
rpmbuild $(RPMBUILD_DEFINES) -bb firstboot/firstboot.spec
|
|
|
|
|
|
|
|
rpms_logos: rpm/SOURCES/qubes-logos-$(QBSLOGOS_VERSION).tar.bz2
|
|
|
|
rpmbuild $(RPMBUILD_DEFINES) -bb qubes-logos/qubes-logos.spec
|
|
|
|
|
|
|
|
rpms_release: rpm/SOURCES/qubes-release-$(QBSRELEASE_VERSION).tar.bz2
|
|
|
|
rpmbuild $(RPMBUILD_DEFINES) -bb qubes-release/qubes-release.spec
|
|
|
|
|
2011-03-31 14:09:42 +00:00
|
|
|
rpms_revisor: revisor/revisor-$(REVISOR_VERSION).tar.gz revisor/revisor.spec
|
2011-03-31 13:47:30 +00:00
|
|
|
rpmbuild --define "_rpmdir rpm/" --define "_sourcedir $(TOP)/revisor" -bb revisor/revisor.spec
|
|
|
|
|
2011-03-31 16:19:08 +00:00
|
|
|
RPMS = rpm/noarch/qubes-logos-$(QBSLOGOS_VERSION)-*.rpm \
|
2011-03-31 14:09:42 +00:00
|
|
|
rpm/noarch/qubes-release-$(QBSRELEASE_VERSION)-*.rpm \
|
|
|
|
rpm/noarch/revisor*-$(REVISOR_VERSION)-*.rpm \
|
|
|
|
rpm/x86_64/anaconda-$(ANACONDA_VERSION)-*.rpm \
|
|
|
|
rpm/x86_64/firstboot-$(FIRSTBOOT_VERSION)-*.rpm
|
|
|
|
|
2011-03-31 13:47:30 +00:00
|
|
|
update-repo:
|
2011-04-03 08:31:43 +00:00
|
|
|
ln -f $(RPMS) yum/installer/rpm/
|
|
|
|
(cd yum && ./update_repo.sh)
|
2011-03-31 13:47:30 +00:00
|
|
|
|
2011-04-01 16:58:29 +00:00
|
|
|
iso:
|
2011-11-10 17:01:19 +00:00
|
|
|
cp rpm_verify /usr/local/bin/
|
2011-04-03 08:31:43 +00:00
|
|
|
ln -sf `pwd` /tmp/qubes-installer
|
2011-11-28 22:00:28 +00:00
|
|
|
revisor --cli --config=conf/qubes-install.conf --model=qubes-x86_64 --install-dvd
|
2012-04-18 23:00:34 +00:00
|
|
|
isohybrid build/ISO/qubes-x86_64/iso/*.iso
|
2012-04-17 14:29:38 +00:00
|
|
|
rpm_verify build/work/revisor-install/R?-*/qubes-x86_64/x86_64/os/Packages/*.rpm
|
2011-04-04 18:05:40 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -fr rpm/SOURCES/*.bz2
|
|
|
|
rm -fr rpm/noarch/*.rpm
|
|
|
|
rm -fr rpm/x86_64/*.rpm
|