File ypops-paths.diff of Package ypops
--- src/Makefile.orig 2008-03-23 00:44:32.000000000 +0700 +++ src/Makefile 2008-05-18 11:30:12.000000000 +0700 @@ -6,15 +6,15 @@ # installed. # RUN_DIR is where ypops runs - this location will be checked # for a current ypopsrc file during make install. -INSTALL_DIR = /usr/local/bin -RUN_DIR = /usr/local/ypops -MIMEPP = ../lib/mimepp-1.3.3 +INSTALL_DIR = /usr/sbin +RUN_DIR = /etc/ypops +MIMEPP = ../lib/mimepp # The *INC and *LIB directories below don't matter for Linux unless you # compile any of them from sources - required for other flavors of Unix -CURL_INC = /usr/local/include -SSL_INC = /usr/local/ssl/include -CURL_LIB = /usr/local/lib -SSL_LIB = /usr/local/ssl/lib +CURL_INC = /usr/include/curl +SSL_INC = /usr/include/openssl +CURL_LIB = /usr/lib +SSL_LIB = /usr/lib # Linux doesn't have libsocket, Older versions of Solaris and other flavors # of Unix do #SOCKET_LIB=-lsocket @@ -59,24 +59,24 @@ make mimelib;make libre_lib;make $(PROGNAME) $(RUN_DIR): - mkdir $@ + mkdir $(DESTDIR)$@ $(INSTALL_DIR): - mkdir $@ + mkdir $(DESTDIR)$@ install: $(RUN_DIR) $(INSTALL_DIR) - if [ ! -s $(RUN_DIR)/ypopsrc ]; then \ - echo cp ypops_samplerc $(RUN_DIR)/ypopsrc; \ - cp ypops_samplerc $(RUN_DIR)/ypopsrc; \ + if [ ! -s $(DESTDIR)$(RUN_DIR)/ypopsrc ]; then \ + echo cp ypops_samplerc $(DESTDIR)$(RUN_DIR)/ypopsrc; \ + cp ypops_samplerc $(DESTDIR)$(RUN_DIR)/ypopsrc; \ fi - if [ `grep -c YPOPS_IP_ADDR $(RUN_DIR)/ypopsrc` -eq 0 ]; then \ - echo cp ypops_samplerc $(RUN_DIR)/ypopsrc; \ - cp ypops_samplerc $(RUN_DIR)/ypopsrc; \ + if [ `grep -c YPOPS_IP_ADDR $(DESTDIR)$(RUN_DIR)/ypopsrc` -eq 0 ]; then \ + echo cp ypops_samplerc $(DESTDIR)$(RUN_DIR)/ypopsrc; \ + cp ypops_samplerc $(DESTDIR)$(RUN_DIR)/ypopsrc; \ fi # more portabe dos2unix... just remove ^M's from file # replace /usr/local/bin with actual INSTALL_DIR tr -d '\015' < ypops.sh | \ - sed 's,/usr/local/bin,$(INSTALL_DIR),' > ypops.sh.new + sed 's,/usr/local/bin,$(DESTDIR)$(INSTALL_DIR),' > ypops.sh.new if ! cmp -s ypops.sh ypops.sh.new; then \ echo fixed ypops.sh ; \ mv ypops.sh.new ypops.sh; \ @@ -85,8 +85,8 @@ fi @echo installing ypops executable and script to $(INSTALL_DIR).. chmod 755 $(PROGNAME)* - cp -p $(PROGNAME) $(INSTALL_DIR)/. - cp -p ypops.sh $(INSTALL_DIR)/. + cp -p $(PROGNAME) $(DESTDIR)$(INSTALL_DIR)/. + cp -p ypops.sh $(DESTDIR)$(INSTALL_DIR)/. $(PROGNAME) : $(OBJS) $(CXX) $(CFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS)