freebsd-ports/www/squidguard/files/patch-Makefile.in
Guido Falsi ef20f8e1b6 Fix staging when port is alredy installed on system.
Reported by:	Jeff Molofee <jeff.molofee at pro-westernplastics.com>
2014-08-22 18:51:46 +00:00

65 lines
2.4 KiB
Text

--- Makefile.in.orig 2008-05-17 20:36:44.000000000 +0200
+++ Makefile.in 2014-08-22 19:47:56.566781181 +0200
@@ -47,48 +47,31 @@
install-conf:
@echo Installing configuration file ;
- @if [ ! -d $(prefix)/squidGuard ]; then \
- $(MKINSTALLDIRS) $(prefix)/squidGuard ; \
- echo Created directory $(prefix)/squidGuard ; \
- chown -R $(SQUIDUSER) $(prefix)/squidGuard || exit 1 ; \
- echo Assigned $(prefix)/squidGuard to user $(SQUIDUSER) ; \
+ @if [ ! -d $(DESTDIR)$(dbhomedir) ]; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(dbhomedir) ; \
+ echo Created directory $(DESTDIR)$(dbhomedir) ; \
+ echo Assigned $(DESTDIR)$(dbhomedir) to user $(SQUIDUSER) ; \
fi ;
- @if [ ! -d $(dbhomedir) ]; then \
- $(MKINSTALLDIRS) $(dbhomedir) ; \
- echo Created directory $(dbhomedir) ; \
- chown -R $(SQUIDUSER) $(dbhomedir) || exit 1 ; \
- echo Assigned $(dbhomedir) to user $(SQUIDUSER) ; \
+ @if [ ! -d $(DESTDIR)$(logdir) ]; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(logdir) ; \
+ echo Created directory $(DESTDIR)$(logdir) ; \
+ echo Assigned $(DESTDIR)$(logdir) to user $(SQUIDUSER) ; \
fi ;
- @if [ ! -d $(logdir) ]; then \
- $(MKINSTALLDIRS) $(logdir) ; \
- echo Created directory $(logdir) ; \
- chown -R $(SQUIDUSER) $(logdir) || exit 1 ; \
- echo Assigned $(logdir) to user $(SQUIDUSER) ; \
- fi ;
- @if [ ! -d `dirname $(configfile)` ]; then \
+ @if [ ! -d `dirname $(DESTDIR)$(configfile)` ]; then \
umask 022 ; \
- mkdir -p `dirname $(configfile)` ; \
- echo No configuration directory found. Created `dirname $(configfile)`. ; \
+ mkdir -p `dirname $(DESTDIR)$(configfile)` ; \
+ echo No configuration directory found. Created `dirname $(DESTDIR)$(configfile)`. ; \
fi;
- @if test ! -f $(configfile); then \
- cp samples/sample.conf $(configfile) || exit 1 ; \
- echo Copied sample squidGuard.conf ; \
- chmod 644 $(configfile) || exit 1 ; \
- echo $(configfile) is now readable ; \
- echo The initial configuration is complete. ; \
- else \
- echo Configuration file found. Not changing anything ; \
- fi;
@echo ;
@echo Congratulation. SquidGuard is sucessfully installed. ;
@echo ;
install-build:
@echo Installing squidGuard
- @if [ ! -d $(bindir) ]; then \
- $(MKINSTALLDIRS) $(bindir) ; \
+ @if [ ! -d $(DESTDIR)$(bindir) ]; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(bindir) ; \
fi ; \
- cp src/squidGuard $(bindir) || exit 1 ; \
+ $(BSD_INSTALL_PROGRAM) src/squidGuard $(DESTDIR)$(bindir) || exit 1 ; \
echo Done. ;
clean::