Makefile 2.99 KB
Newer Older
1
2
all:

3
install: install-program install-hooks install-examples install-doc
4
5

install-program:
6
	# install to sbin since script only usable by root
7
	install -D -m 755 mkarchiso $(DESTDIR)/usr/sbin/mkarchiso
8
	# testiso can be used by anyone
9
	install -D -m 755 testiso $(DESTDIR)/usr/bin/testiso
10
11

install-hooks:
12
	# hooks/install are needed by mkinitcpio
13
14
	install -D -m 644 hooks/archiso $(DESTDIR)/lib/initcpio/hooks/archiso
	install -D -m 644 install/archiso $(DESTDIR)/lib/initcpio/install/archiso
15
16
17
	install -D -m 755 archiso_shutdown $(DESTDIR)/lib/initcpio/archiso_shutdown
	install -D -m 644 hooks/archiso_shutdown $(DESTDIR)/lib/initcpio/hooks/archiso_shutdown
	install -D -m 644 install/archiso_shutdown $(DESTDIR)/lib/initcpio/install/archiso_shutdown
18
	install -D -m 644 archiso_pxe_nbd $(DESTDIR)/lib/initcpio/archiso_pxe_nbd
19
20
	install -D -m 644 hooks/archiso_pxe_common $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_common
	install -D -m 644 install/archiso_pxe_common $(DESTDIR)/lib/initcpio/install/archiso_pxe_common
21
22
	install -D -m 644 hooks/archiso_pxe_nbd $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_nbd
	install -D -m 644 install/archiso_pxe_nbd $(DESTDIR)/lib/initcpio/install/archiso_pxe_nbd
23
24
	install -D -m 644 hooks/archiso_pxe_curl $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_curl
	install -D -m 644 install/archiso_pxe_curl $(DESTDIR)/lib/initcpio/install/archiso_pxe_curl
25
26
	install -D -m 644 hooks/archiso_pxe_nfs $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_nfs
	install -D -m 644 install/archiso_pxe_nfs $(DESTDIR)/lib/initcpio/install/archiso_pxe_nfs
27
28
	install -D -m 644 hooks/archiso_loop_mnt $(DESTDIR)/lib/initcpio/hooks/archiso_loop_mnt
	install -D -m 644 install/archiso_loop_mnt $(DESTDIR)/lib/initcpio/install/archiso_loop_mnt
29
30
31

install-examples:
	# install examples
32
	install -d -m 755 $(DESTDIR)/usr/share/archiso/
33
	cp -r ../configs $(DESTDIR)/usr/share/archiso/
34

35
36
37
38
install-doc:
	install -d -m 755 $(DESTDIR)/usr/share/archiso/
	install -D -m 644 ../README $(DESTDIR)/usr/share/doc/archiso/README
	
39
40
41
uninstall:
	rm -f $(DESTDIR)/usr/sbin/mkarchiso
	rm -f $(DESTDIR)/usr/bin/testiso
Aaron Griffin's avatar
Aaron Griffin committed
42
43
	rm -f $(DESTDIR)/lib/initcpio/hooks/archiso
	rm -f $(DESTDIR)/lib/initcpio/install/archiso
44
45
46
	rm -f $(DESTDIR)/lib/initcpio/archiso_shutdown
	rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_shutdown
	rm -f $(DESTDIR)/lib/initcpio/install/archiso_shutdown
47
	rm -f $(DESTDIR)/lib/initcpio/archiso_pxe_nbd
48
49
	rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_common
	rm -f $(DESTDIR)/lib/initcpio/install/archiso_pxe_common
50
51
	rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_nbd
	rm -f $(DESTDIR)/lib/initcpio/install/archiso_pxe_nbd
52
53
	rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_curl
	rm -f $(DESTDIR)/lib/initcpio/install/archiso_pxe_curl
54
55
	rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_pxe_nfs
	rm -f $(DESTDIR)/lib/initcpio/install/archiso_pxe_nfs
56
57
	rm -f $(DESTDIR)/lib/initcpio/hooks/archiso_loop_mnt
	rm -f $(DESTDIR)/lib/initcpio/install/archiso_loop_mnt
58
	rm -rf $(DESTDIR)/usr/share/archiso/
59

60
.PHONY: install install-program install-hooks install-examples install-doc uninstall