forked from QubesOS/qubes-vmm-xen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.builder
41 lines (34 loc) · 1.53 KB
/
Makefile.builder
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
ifeq ($(PACKAGE_SET),dom0)
RPM_SPEC_FILES := xen.spec
else ifeq ($(PACKAGE_SET),vm)
RPM_SPEC_FILES := xen.spec
ARCH_BUILD_DIRS := archlinux
ifneq ($(filter $(DISTRIBUTION), debian qubuntu),)
DEBIAN_BUILD_DIRS := debian-vm/debian
SOURCE_COPY_IN := source-debian-xen-copy-in
endif
endif
NO_ARCHIVE := 1
INCLUDED_SOURCES = \
gui-agent-xen-hvm-stubdom \
core-vchan-xen \
stubdom-dhcp \
gui-common
ifneq ($(filter $(DISTRIBUTION), fedora centos centos-stream),)
SOURCE_COPY_IN := $(INCLUDED_SOURCES)
endif
$(INCLUDED_SOURCES): PACKAGE=$@
$(INCLUDED_SOURCES): VERSION=$(shell git -C $(ORIG_SRC)/$(PACKAGE) rev-parse --short HEAD)
$(INCLUDED_SOURCES):
$(BUILDER_DIR)/scripts/create-archive $(CHROOT_DIR)/$(DIST_SRC)/$(PACKAGE) $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)/
mv $(CHROOT_DIR)/$(DIST_SRC)/$(PACKAGE)/$(PACKAGE)-$(VERSION).tar.gz $(CHROOT_DIR)/$(DIST_SRC)
sed -i "s#@$(PACKAGE)@#$(PACKAGE)-$(VERSION).tar.gz#" $(CHROOT_DIR)/$(DIST_SRC)/xen.spec.in
source-debian-xen-copy-in: VERSION = $(shell cat $(ORIG_SRC)/version)
source-debian-xen-copy-in: ORIG_FILE = "$(CHROOT_DIR)/$(DIST_SRC)/xen_$(VERSION).orig.tar.gz"
source-debian-xen-copy-in: SRC_FILE = "$(CHROOT_DIR)/$(DIST_SRC)/xen-$(VERSION).tar.gz"
source-debian-xen-copy-in:
-$(ORIG_SRC)/debian-quilt $(ORIG_SRC)/series-debian-vm.conf $(CHROOT_DIR)/$(DIST_SRC)/debian/patches
tar xfz $(SRC_FILE) -C $(CHROOT_DIR)/$(DIST_SRC)/debian-vm --strip-components=1
rm -f $(CHROOT_DIR)/$(DIST_SRC)/debian-vm/rel
rm -f $(CHROOT_DIR)/$(DIST_SRC)/debian-vm/version
cp $(SRC_FILE) $(ORIG_FILE)