2011-11-06 13:02:24 +00:00
|
|
|
ifndef DIST
|
|
|
|
$(error "You must set DIST variable, e.g. DIST=fc14")
|
|
|
|
endif
|
|
|
|
|
|
|
|
TEMPLATE_NAME := $${DIST/fc/fedora-}-x64
|
2012-11-06 09:43:45 +00:00
|
|
|
VERSION := $(shell cat version)
|
|
|
|
TIMESTAMP := $(shell date -u +%Y%m%d%H%M)
|
2011-11-06 13:02:24 +00:00
|
|
|
|
2013-02-07 22:29:14 +00:00
|
|
|
PKGLISTFILE := $(shell [ -r clean_images/packages_$(DIST).list ] && echo clean_images/packages_$(DIST).list || echo clean_images/packages.list)
|
|
|
|
|
2011-11-06 13:02:24 +00:00
|
|
|
help:
|
|
|
|
@echo "make rpms -- generate template rpm"
|
|
|
|
@echo "make update-repo-installer -- copy newly generated rpm to installer repo"
|
2011-11-09 11:49:54 +00:00
|
|
|
@echo "make clean -- copy newly generated rpm to installer repo"
|
2011-11-06 13:02:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
rpms:
|
2012-11-06 09:43:45 +00:00
|
|
|
@echo $(TIMESTAMP) > build_timestamp
|
2011-11-06 13:02:24 +00:00
|
|
|
@echo "Building template: $(TEMPLATE_NAME)"
|
2012-11-18 03:01:49 +00:00
|
|
|
@createrepo -q -g $$PWD/comps-qubes-template.xml yum_repo_qubes/$(DIST) -o yum_repo_qubes/$(DIST) && \
|
2013-02-07 22:29:14 +00:00
|
|
|
sudo -E ./fedorize_image fedorized_images/$(TEMPLATE_NAME).img $(PKGLISTFILE) && \
|
2011-11-06 13:02:24 +00:00
|
|
|
sudo -E ./qubeize_image fedorized_images/$(TEMPLATE_NAME).img $(TEMPLATE_NAME) && \
|
|
|
|
./build_template_rpm $(TEMPLATE_NAME) || exit 1; \
|
|
|
|
|
|
|
|
update-repo-installer:
|
2012-11-06 09:43:45 +00:00
|
|
|
ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-$(shell cat build_timestamp)*.noarch.rpm ../installer/yum/qubes-dom0/rpm
|
2011-11-06 13:02:24 +00:00
|
|
|
|
2012-11-14 15:12:18 +00:00
|
|
|
prepare-repo-template:
|
|
|
|
rm -rf yum_repo_qubes/*
|
|
|
|
mkdir -p yum_repo_qubes/$(DIST)/rpm yum_repo_qubes/$(DIST)/repodata
|
|
|
|
|
2011-11-09 11:49:54 +00:00
|
|
|
clean:
|
|
|
|
sudo rm -fr qubeized_images/root.img.*
|
|
|
|
sudo rm -fr qubeized_images/$(TEMPLATE_NAME)*
|
2011-11-09 16:14:09 +00:00
|
|
|
sudo rm -fr rpmbuild/BUILDROOT/*
|
|
|
|
sudo rm -fr rpmbuild/tmp/*
|
2011-11-09 11:49:54 +00:00
|
|
|
# We're not removing any images from fedorized_images/ intentionally
|
|
|
|
# because the user might want to keep using the same image for a long time
|
|
|
|
# and they are not dependent on any of the Qubes packahes
|
2011-11-06 13:02:24 +00:00
|
|
|
|