~snappy-dev/core-snap/trunk

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
DPKG_ARCH := $(shell dpkg --print-architecture)
RELEASE := $(shell lsb_release -c -s)
ENV := PROJECT=ubuntu-core SUBPROJECT=system-image EXTRA_PPAS='snappy-dev/image snappy-dev/edge' IMAGEFORMAT=plain SUITE=$(RELEASE) ARCH=$(DPKG_ARCH)

# workaround for LP: #1588336, needs to be bumped along
# with the snapcraft.yaml version for now
VERSION := 16.04.1

#ifneq ($(shell grep $(RELEASE)-proposed /etc/apt/sources.list),)
#ENV += PROPOSED=1
#endif


all:
	mkdir -p auto
	for f in config build clean; \
	    do ln -s /usr/share/livecd-rootfs/live-build/auto/$$f auto/; \
	done
	$(ENV) lb clean
	$(ENV) lb config
	$(ENV) lb build

install:
	echo "I: in install target"
	# workaround for http://pad.lv/1605622
	rm -rf binary/boot/filesystem.dir/meta
	# make sure /tmp in the snap is mode 1777
	chmod 1777 binary/boot/filesystem.dir/tmp
	mv binary/boot/filesystem.dir/* $(DESTDIR)/
	mv livecd.ubuntu-core.manifest /build/core/core_$(VERSION)_$(DPKG_ARCH).manifest
	ls -l /build/core