Change default group from 1 (daemon) to something more sensible: 100
[mspang/plceo2.git] / Makefile
1 PREFIX = /usr/local
2 INSTALL_DIR = $(PREFIX)/lib/ceo
3 #PERM_GROUP = burners
4 PERM_GROUP = office
5 PERM_OWNER = ceo
6
7 all: ceo.pl ceoquery.pl
8
9 clean:
10         rm -f ceo.pl ceo.pl.install ceoquery.pl ceoquer.pl.install
11
12 install: ceo.pl.install ceoquery.pl.install
13         install -d $(INSTALL_DIR) $(INSTALL_DIR)/modules
14         install -m "u=rwxs,g=rx,o=" -o $(PERM_OWNER) -g $(PERM_GROUP) ceo.pl.install $(INSTALL_DIR)/ceo.pl
15         install -m "u=rwxs,g=rx,o=rx" -o $(PERM_OWNER) -g $(PERM_GROUP) ceoquery.pl.install $(INSTALL_DIR)/ceoquery.pl
16         install -m "u=rwx,g=rx,o=" -o $(PERM_OWNER) -g $(PERM_GROUP) modules/*.pm $(INSTALL_DIR)/modules
17         rm -f $(PREFIX)/bin/ceo $(PREFIX)/bin/ceoquery
18         ln -s $(INSTALL_DIR)/ceo.pl $(PREFIX)/bin/ceo
19         ln -s $(INSTALL_DIR)/ceoquery.pl $(PREFIX)/bin/ceoquery
20
21 %.pl: %.pl.in
22         sed "s/MODULE_PATH/.\\/modules/" $< > $@
23         chmod +x $@
24
25 %.install: %.in
26         sed "s/MODULE_PATH/\\/usr\\/local\\/lib\\/ceo\\/modules/" $< > $@
27         chmod +x $@