summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 610f41b755a0d6ae4cb7bbb9b500117185cd5e9e (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
##
## Don't edit this file, edit Makefile.proto
##

VERSION=0.1
RPM=$(HOME)/rpm

rpm:
	rm -rf drakwizard-$(VERSION)
	mkdir drakwizard-$(VERSION)
	cp -rf server_wizard drakwizard-$(VERSION)
	cp -rf common drakwizard-$(VERSION)
	cp -rf dhcp_wizard drakwizard-$(VERSION)
	cp -rf dns_wizard drakwizard-$(VERSION)
	cp -rf firewall_wizard drakwizard-$(VERSION)
	cp -rf global_wizard drakwizard-$(VERSION)
	cp -rf postfix_wizard drakwizard-$(VERSION)
	cp -rf samba_wizard drakwizard-$(VERSION)
	cp -rf time_wizard drakwizard-$(VERSION)
	cp -rf web_wizard drakwizard-$(VERSION)
	cp -rf ftp_wizard drakwizard-$(VERSION)
	cp -rf news_wizard drakwizard-$(VERSION)
	cp -rf client_wizard drakwizard-$(VERSION)
	cp -rf db_wizard drakwizard-$(VERSION)
	cp -rf proxy_wizard drakwizard-$(VERSION)
	cp -f Wizard.dtd Makefile drakwizard.pl drakwizard.spec drakwizard-$(VERSION)
	rm -f drakwizard-$(VERSION).tar.bz2
	rm -f drakwizard-$(VERSION).tar
	tar cvf drakwizard-$(VERSION).tar drakwizard-$(VERSION)
	rm -rf drakwizard-$(VERSION)
	bzip2 -z9 drakwizard-$(VERSION).tar
	mv drakwizard-$(VERSION).tar.bz2 $(RPM)/SOURCES
	cp -f drakwizard.spec $(RPM)/SPECS 
	(cd $(RPM)/SPECS; rpm -ba drakwizard.spec)
# installs all the wizards...

install:
	find -regex ".*\.wiz$$\|.*.pm$$" -exec perl -pi -e "s|__WIZ_HOME__|/usr/share/wizards|g" \{\} \;
	mkdir -p ${prefix}/sbin
	install -p drakwizard.pl ${prefix}/sbin/drakwizard
	cd server_wizard; make prefix=${prefix} install
	cd common; make prefix=${prefix} install
	cd dhcp_wizard; make prefix=${prefix} install
	cd dns_wizard; make prefix=${prefix} install
	cd firewall_wizard; make prefix=${prefix} install
	cd global_wizard; make prefix=${prefix} install
	cd postfix_wizard; make prefix=${prefix} install
	cd samba_wizard; make prefix=${prefix} install
	cd time_wizard; make prefix=${prefix} install
	cd web_wizard; make prefix=${prefix} install
	cd ftp_wizard; make prefix=${prefix} install
	cd news_wizard; make prefix=${prefix} install
	cd client_wizard; make prefix=${prefix} install
	cd db_wizard; make prefix=${prefix} install
	cd proxy_wizard; make prefix=${prefix} install

clean_test:
	rm -rf test

test:	clean_test
	mkdir test
	cp -rf server_wizard test
	cp -rf common test
	cp -rf dhcp_wizard test
	cp -rf dns_wizard test
	cp -rf firewall_wizard test
	cp -rf global_wizard test
	cp -rf postfix_wizard test
	cp -rf samba_wizard test
	cp -rf time_wizard test
	cp -rf web_wizard test
	cp -rf ftp_wizard test
	cp -rf news_wizard test
	cp -rf client_wizard test
	cp -rf db_wizard test
	cp -rf proxy_wizard test
	cp -f Wizard.dtd Makefile drakwizard.pl drakwizard.spec test
	find test -regex ".*\.wiz$$\|.*.pm$$" -exec perl -pi -e "s|__WIZ_HOME__|$(PWD)/test|g" \{\} \;