summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 532c327c4c12735ffa8d9a8052cb524fc88ced28 (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
RPM=$(HOME)/rpm
NAME = drakwizard
TAR = $(NAME).tar.bz2
WIZ =	common\
	server_wizard\
	dhcp_wizard\
	dns_wizard\
	firewall_wizard\
#	global_wizard\
	postfix_wizard\
	samba_wizard\
	time_wizard\
	web_wizard\
	ftp_wizard\
	news_wizard\
	client_wizard\
	db_wizard\
	proxy_wizard\
	nfs_wizard\
	data\
	po

all:

# installs all the wizards...

install:
	mkdir -p ${prefix}/sbin
	install -p drakwizard.pl ${prefix}/sbin/drakwizard
	for l in $(WIZ); do \
		$(MAKE) -C $$l $@; \
	done
	find  ${prefix}/share/wizards -regex ".*\.wiz$$\|.*.pm$$\|.*\.sh$$" -exec \
		perl -i -pe "s|__WIZ_HOME__|/usr/share/wizards|g" \{\} \;

clean:
	$(MAKE) -C po $@
	rm -f *~

tar: clean
	cd ..; cp -rf wizard_perl $(NAME)
	cd ..; tar cf - $(NAME) | bzip2 -9 > $(TAR)
	cd ..; rm -rf $(NAME)

rpm: tar 
	cp -f ../$(TAR) $(RPM)/SOURCES
	cp -f $(NAME).spec $(RPM)/SPECS/
	-rpm -ba $(NAME).spec
	rm -f ../$(TAR)

clean_test:
	rm -rf test

test:	clean_test
	mkdir test
	cp -r $(WIZ) test
	cp Wizard.dtd Makefile drakwizard.pl drakwizard.spec test
	find test -regex ".*\.wiz$$\|.*\.pm$$\|.*\.sh$$" -exec \
		perl -i -pe "s|__WIZ_HOME__|$(PWD)/test|g" \{\} \;