--- Makefile.orig 2013-11-15 10:28:02 UTC +++ Makefile @@ -40,36 +40,35 @@ cygwin: clean cygwin_vars ${REDIRECTOR_O install: # Make dirs - mkdir -p ${INSTALL_PATH}/tools + mkdir -p ${DESTDIR}${INSTALL_PATH}/tools # Install redirector - cp make-cache ${INSTALL_PATH} - cp redirector ${INSTALL_PATH} - cp redirector.conf.dist ${INSTALL_PATH} + ${BSD_INSTALL_PROGRAM} make-cache ${DESTDIR}${INSTALL_PATH} + ${BSD_INSTALL_PROGRAM} redirector ${DESTDIR}${INSTALL_PATH} + cp redirector.conf.dist ${DESTDIR}${INSTALL_PATH} # Install tools - echo "#!/bin/sh" > ${INSTALL_PATH}/tools/check-redirector - echo 'su ${SQUID_USER} -c "echo \"http://sex.ru 127.0.0.1/- - GET\" | ${INSTALL_PATH}/redirector ${INSTALL_PATH}/redirector.conf;"' >> ${INSTALL_PATH}/tools/check-redirector - chmod 755 ${INSTALL_PATH}/tools/check-redirector + echo "#!/bin/sh" > ${DESTDIR}${INSTALL_PATH}/tools/check-redirector + echo 'su ${SQUID_USER} -c "echo \"http://sex.ru 127.0.0.1/- - GET\" | ${INSTALL_PATH}/redirector ${INSTALL_PATH}/redirector.conf;"' >> ${DESTDIR}${INSTALL_PATH}/tools/check-redirector + chmod 755 ${DESTDIR}${INSTALL_PATH}/tools/check-redirector - echo "#!/bin/sh" > ${INSTALL_PATH}/tools/set-permissions - echo 'chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}' >> ${INSTALL_PATH}/tools/set-permissions - chmod 755 ${INSTALL_PATH}/tools/set-permissions + echo "#!/bin/sh" > ${DESTDIR}${INSTALL_PATH}/tools/set-permissions + echo 'chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}' >> ${DESTDIR}${INSTALL_PATH}/tools/set-permissions + chmod 755 ${DESTDIR}${INSTALL_PATH}/tools/set-permissions - cp tools/kill-cache ${INSTALL_PATH}/tools - chmod 755 ${INSTALL_PATH}/tools/kill-cache + cp tools/kill-cache ${DESTDIR}${INSTALL_PATH}/tools + chmod 755 ${DESTDIR}${INSTALL_PATH}/tools/kill-cache - cp tools/benchmark ${INSTALL_PATH}/tools - chmod 755 ${INSTALL_PATH}/tools/benchmark + cp tools/benchmark ${DESTDIR}${INSTALL_PATH}/tools + chmod 755 ${DESTDIR}${INSTALL_PATH}/tools/benchmark - cp tools/IN.gz ${INSTALL_PATH}/tools - chmod 644 ${INSTALL_PATH}/tools/IN.gz + cp tools/IN.gz ${DESTDIR}${INSTALL_PATH}/tools + chmod 644 ${DESTDIR}${INSTALL_PATH}/tools/IN.gz # Set permissions - chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH} - chmod 770 ${INSTALL_PATH} - chmod 644 ${INSTALL_PATH}/redirector.conf.dist - chmod 755 ${INSTALL_PATH}/redirector - chmod 755 ${INSTALL_PATH}/make-cache + chmod 770 ${DESTDIR}${INSTALL_PATH} + chmod 644 ${DESTDIR}${INSTALL_PATH}/redirector.conf.dist + chmod 755 ${DESTDIR}${INSTALL_PATH}/redirector + chmod 755 ${DESTDIR}${INSTALL_PATH}/make-cache