Package: phpwebcounter / 1.0-3

Makefile.patch Patch series | download
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
Description: Makes Makefile compliant with Debian.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Last-Update: 2013-07-02
--- a/Makefile
+++ b/Makefile
@@ -4,11 +4,11 @@
 #
 # Possible targets: install and uninstall
 
-WEB_STUFF_PATH	= /var/www
+WEB_STUFF_PATH	= $(DESTDIR)/usr/share
 PROGRAM_PATH	= $(WEB_STUFF_PATH)/phpwebcounter
 IMAGES_PATH	= $(PROGRAM_PATH)/images
-CONFIG_PATH	= /etc/phpwebcounter
-HITS_PATH	= /var/lib/phpwebcounter
+CONFIG_PATH	= $(DESTDIR)/etc/phpwebcounter
+HITS_PATH	= $(DESTDIR)/var/lib/phpwebcounter
 HTTP_USER	= www-data
 HTTP_GROUP	= www-data
 
@@ -27,7 +27,7 @@
 	@echo Installing config file...; cp phpwebcounter.config.php $(CONFIG_PATH)	
 	@if [ ! -d $(IMAGES_PATH) ]; then echo Creating $(IMAGES_PATH)...; mkdir -p $(IMAGES_PATH); fi
 	@echo Copying images...; cp -a images/* $(IMAGES_PATH)
-	@if [ ! -d $(HITS_PATH) ]; then echo Creating $(HITS_PATH)...; mkdir $(HITS_PATH); echo; fi
+	@if [ ! -d $(HITS_PATH) ]; then echo Creating $(HITS_PATH)...; mkdir -p $(HITS_PATH); echo; fi
 	@chown $(HTTP_USER).$(HTTP_GROUP) $(HITS_PATH)
 	#
 	# --------------------------