aboutsummaryrefslogtreecommitdiffstats
path: root/www/zerowait-httpd/files/patch-Makefile
blob: 2c8229702454a3921f75e786c0ab4f8ebeb5bc11 (plain) (blame)
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
--- Makefile.orig   Sun Apr 17 05:07:11 2005
+++ Makefile    Wed Jun 22 14:16:31 2005
@@ -10,13 +10,15 @@
    rm -f *~ src/*~
 
 install: compile
-   install -d $(ROOT)/bin $(ROOT)/conf $(ROOT)/docs
-   install -d -o $(OWNER) -g $(GROUP) $(ROOT)/logs $(ROOT)/data/pids $(ROOT)/data/httpd
-   test -f $(ROOT)/conf/httpd.conf || install -m 644 conf/httpd.conf $(ROOT)/conf
-   install -b -m 644 conf/countries* $(ROOT)/conf
-   install -b -m 644 docs/* $(ROOT)/docs
-   install -b bin/update-countries.sh src/httpd/convert-ranges src/httpd/convert-geoip $(ROOT)/bin
-   install -b -m 6755 -o $(OWNER) -g $(GROUP) src/httpd/0W-httpd $(ROOT)/bin
+   test -d $(ROOT)/0W-httpd || (mkdir $(ROOT)/0W-httpd)
+   install -d $(ROOT)/0W-httpd/data $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/pids
+   install -m 0755 bin/update-countries.sh src/httpd/convert-ranges src/httpd/convert-geoip $(ROOT)/bin
+   install -m 6755 -o $(OWNER) -g $(GROUP) src/httpd/0W-httpd $(ROOT)/sbin
+   test -d $(ROOT)/etc/0W-httpd || (mkdir $(ROOT)/etc/0W-httpd && cd conf/ && \
+           cp countries* $(ROOT)/etc/0W-httpd/ && \
+           cp httpd.conf $(ROOT)/etc/0W-httpd/httpd.conf.sample )
+   chown -R $(OWNER):$(GROUP) $(ROOT)/sbin/0W-httpd $(ROOT)/0W-httpd/logs $(ROOT)/0W-httpd/data $(ROOT)/0W-httpd/pids
+
    @echo
    @echo "Installed, run as root: $(ROOT)/bin/0W-httpd [-h]"
 
@@ -33,3 +35,5 @@
    @read answer
    killall 0W-httpd || true
    rm -rf $(ROOT)
+
+all: compile