summaryrefslogtreecommitdiffstats
path: root/images/Makefile
blob: 1299543c1f0d663119f3745dfe7fd92bf39b1235 (plain)
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
include ../Makefile.config

VERSION=2.91
PRODUCT=drakx-installer-images
KERNELS=$(shell rpm -qf /lib/modules/6.*)

IMAGES_DEST = $(ROOTDEST)/install/images

all: images

boot.iso: images/boot.iso

images/boot.iso: all.kernels/.list make_boot_img
	DISTRIB_DESCR=$(DISTRIB_DESCR) DISTRIB_VERSION=$(DISTRIB_VERSION) ./make_boot_img images/boot.iso

all.img: images/all.img

images/all.img: all.kernels/.list make_boot_img
	DISTRIB_DESCR=$(DISTRIB_DESCR) DISTRIB_VERSION=$(DISTRIB_VERSION) ./make_boot_img images/all.img

images: all.kernels/.list
	DISTRIB_DESCR=$(DISTRIB_DESCR) DISTRIB_VERSION=$(DISTRIB_VERSION) ./make_boot_img
	rm -rf images/alternatives 
	if [ `ls images/*.img-* 2>/dev/null | wc -l` -gt 0 ]; then	\
	  mkdir images/alternatives; cd images/alternatives; mv ../*.img-* .; md5sum *.img-* > MD5SUM; sha512sum *.img-* > SHA512SUM; \
	fi
	if [ `ls images/*.img* 2>/dev/null | wc -l` -gt 0 ]; then \
	  md5sum images/*.img* > MD5SUM ; sha512sum images/*.img* > SHA512SUM ; \
	fi
	if [ `ls images/*.iso* 2>/dev/null | wc -l` -gt 0 ]; then \
	  md5sum images/*.iso* > MD5SUM ; sha512sum images/*.iso* > SHA512SUM ; \
	fi



all.kernels/.list: update_kernel
	./update_kernel $(KERNELS)

dist: tar
tar:
	@rm -rf $(PRODUCT)*.tar* $(PRODUCT)-$(VERSION)
	@cd ..; git archive --prefix=$(PRODUCT)-$(VERSION)/ HEAD images kernel Makefile.config | xz >images/$(PRODUCT)-$(VERSION).tar.xz;
	$(info $(PRODUCT)-$(VERSION).tar.xz is ready)

clean:
	rm -rf images isolinux all.kernels modules.description build
	find . -name "*~" -o -name ".#*" | xargs rm -f

install:
	install -d $(IMAGES_DEST)
	rm -rf $(IMAGES_DEST)/alternatives 
	cp -r images/* $(IMAGES_DEST)
    ifneq (,$(findstring $(ARCH), i386 x86_64))
	rm -rf $(ROOTDEST)/isolinux
	cp -af isolinux $(ROOTDEST)
    endif

.PHONY: boot.iso all.img install clean dist tar images