diff options
author | marino <marino@FreeBSD.org> | 2014-04-22 02:14:29 +0800 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2014-04-22 02:14:29 +0800 |
commit | 8dcd403f54c3d9d8eb7d4b316b4b1d45cbef873c (patch) | |
tree | 1b3c9ad005565ac8758afd30c990a5507a896fd3 /net/ss5 | |
parent | 7a85eaa0fd5072e7c19316c50824499d79494ac3 (diff) | |
download | freebsd-ports-gnome-8dcd403f54c3d9d8eb7d4b316b4b1d45cbef873c.tar.gz freebsd-ports-gnome-8dcd403f54c3d9d8eb7d4b316b4b1d45cbef873c.tar.zst freebsd-ports-gnome-8dcd403f54c3d9d8eb7d4b316b4b1d45cbef873c.zip |
net/ss5: Fix on clang, DragonFly, and support stage
I estimated it would take me 15 minutes to incorporate the PR, but boy
was I wrong. After several HOURS I finally got this port staged,
building on FreeBSD 10+, DragonFly too, and fix accomplished the
intent of the PR (don't clobber conf files, less noisy).
Staging revealed the original port was installing undocumented files.
Clang was having issues with the "inline" directives and I could only
get it to build on clang by removing them (this doesn't mean the
functions won't be inlined, nor does the directive mean that it will.)
Anyway -- a gift. I wouldn't have done this had I know how much work
it was going to be. I also should have overwritten the install
target instead of patch the vendor Makefile, that would have been a
lot easier and faster.
PR: ports/176676
Submitted by: Lawrence Chen
Approved by: maintainer (Raffaele DeLorenzo)
Other work by: marino
MFH: 2014Q2
Diffstat (limited to 'net/ss5')
-rw-r--r-- | net/ss5/Makefile | 21 | ||||
-rw-r--r-- | net/ss5/files/patch-Makefile.in | 207 | ||||
-rw-r--r-- | net/ss5/files/patch-configure | 22 | ||||
-rw-r--r-- | net/ss5/files/patch-include_SS5Debug.h | 47 | ||||
-rw-r--r-- | net/ss5/files/patch-include_SS5Server.h | 11 | ||||
-rw-r--r-- | net/ss5/files/patch-src-SS5Server.c | 11 | ||||
-rw-r--r-- | net/ss5/pkg-plist | 18 |
7 files changed, 196 insertions, 141 deletions
diff --git a/net/ss5/Makefile b/net/ss5/Makefile index e2020eaa94c7..c4bdcc884fc7 100644 --- a/net/ss5/Makefile +++ b/net/ss5/Makefile @@ -3,6 +3,7 @@ PORTNAME= ss5 PORTVERSION= 3.8.5 +PORTREVISION= 1 CATEGORIES= net security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}-1 DISTNAME= ${PORTNAME}-${PORTVERSION}-1 @@ -22,26 +23,20 @@ CONFIGURE_ARGS= --with-binpathbase=${PREFIX}/sbin \ --with-libpath=${PREFIX}/lib MAKE_ENV= DATADIR=${DATADIR} EXAMPLESDIR=${EXAMPLESDIR} +MAKE_ARGS+= CC=${CC} CFLAGS+= -DLDAP_DEPRECATED -MAN1= ss5.1 ss5srv.1 -MAN5= ss5.conf.5 ss5.pam.5 ss5.passwd.5 ss5.ha.5 ss5_gss.5 ss5_supa.5 -MANCOMPRESSED= yes - -NO_STAGE= yes post-patch: @${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},g' ${WRKSRC}/Makefile.in @${REINPLACE_CMD} -e 's,/usr/local/etc/opt/ss5,${PREFIX}/etc/ss5,' \ ${WRKSRC}/include/config.h.in post-install: -# ${TOUCH} ${PREFIX}/etc/ss5/ss5.ha.default -#.if !exists(${PREFIX}/etc/ss5/ss5.ha) -# ${TOUCH} ${PREFIX}/etc/ss5/ss5.ha -#.endif - ${INSTALL_DATA} ${WRKSRC}/conf/examples/ss5.ha ${PREFIX}/etc/${PORTNAME}/ss5.ha.default - if [ ! -f ${PREFIX}/etc/${PORTNAME}.ha ]; then \ - ${INSTALL_DATA} ${WRKSRC}/conf/examples/ss5.ha ${PREFIX}/etc/${PORTNAME}/ss5.ha ; \ - fi + ${INSTALL_DATA} ${WRKSRC}/conf/ss5.conf \ + ${STAGEDIR}${PREFIX}/etc/ss5/ss5.conf.sample + ${INSTALL_DATA} ${WRKSRC}/conf/ss5.ha \ + ${STAGEDIR}${PREFIX}/etc/ss5/ss5.ha.sample + ${INSTALL_DATA} ${WRKSRC}/conf/ss5.passwd \ + ${STAGEDIR}${PREFIX}/etc/ss5/ss5.passwd.sample .include <bsd.port.mk> diff --git a/net/ss5/files/patch-Makefile.in b/net/ss5/files/patch-Makefile.in index 70d1ac7bf1bf..4acf3df95003 100644 --- a/net/ss5/files/patch-Makefile.in +++ b/net/ss5/files/patch-Makefile.in @@ -1,33 +1,54 @@ ---- Makefile.in.orig 2009-07-17 18:03:01.000000000 -0300 -+++ Makefile.in 2011-05-11 15:16:05.000000000 -0300 -@@ -10,6 +10,11 @@ +--- Makefile.in.orig 2009-07-17 16:03:01.000000000 -0500 ++++ Makefile.in +@@ -1,7 +1,7 @@ + SUBDIRS=src modules + +-dst_dir = ${prefix} +-OS = @OS@ ++dst_dir = ${DESTDIR}${prefix} ++OS = FreeBSD + lib_path_base = @lib_path_base@ + conf_path_base = @conf_path_base@ + bin_path_base = @bin_path_base@ +@@ -10,7 +10,9 @@ man_path_base = @man_path_base@ log_path_base = @log_path_base@ trc_path_base = @trc_path_base@ -+ss5_pam = ${PREFIX}/etc/pam.d/ss5 -+ss5_share = ${DATADIR} -+ss5_examples = ${EXAMPLESDIR} -+ss5_man = ${MANPREFIX}/man -+ - CC = gcc +-CC = gcc ++ss5_share = ${DESTDIR}${DATADIR} ++ss5_examples = ${DESTDIR}${EXAMPLESDIR} ++ss5_man = ${DESTDIR}${MANPREFIX}/man CFLAGS=@CFLAGS@ -I . @EXTRA_CFLAGS@ -@@ -41,10 +46,21 @@ + +@@ -32,19 +34,26 @@ src :: + + .PHONY : install + install: +- @( if [ ! -d $(dst_dir)$(log_path_base) ]; then mkdir -p $(dst_dir)$(log_path_base); fi ) +- @( if [ ! -d $(dst_dir)$(trc_path_base) ]; then mkdir -p $(dst_dir)$(trc_path_base); fi ) +- +- @( if [ ! -d $(dst_dir)$(bin_path_base) ]; then mkdir -p $(dst_dir)$(bin_path_base); fi ) +- @( cp src/ss5 $(dst_dir)$(bin_path_base)/ ) +- @( cp src/ss5srv $(dst_dir)$(bin_path_base)/ ) ++ cp src/ss5 $(dst_dir)$(bin_path_base)/ ++ cp src/ss5srv $(dst_dir)$(bin_path_base)/ @( if [ ! -d $(dst_dir)$(lib_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(lib_path_base)/ss5; fi ) - @( find modules -name *.so -exec cp {} $(dst_dir)$(lib_path_base)/ss5/ \; ) +- @( find modules -name *.so -exec cp {} $(dst_dir)$(lib_path_base)/ss5/ \; ) - @( cp modules/mod_statistics/statmgr.cgi $(dst_dir)$(lib_path_base)/ss5/ ) - @( cp modules/mod_balance/balamgr.cgi $(dst_dir)$(lib_path_base)/ss5/ ) - @( cp modules/mod_statistics/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ ) - @( cp modules/mod_balance/SS5Logo.jpg $(dst_dir)$(lib_path_base)/ss5/ ) ++ find modules -name *.so -exec cp {} $(dst_dir)$(lib_path_base)/ss5/ \; + + @( if [ ! -d $(ss5_share) ] && [ $(OS) = "FreeBSD" ]; then mkdir -p $(ss5_share); fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then \ ++ if [ $(OS) = "FreeBSD" ]; then \ + cp modules/mod_statistics/statmgr.cgi $(ss5_share)/ ; \ + cp modules/mod_balance/balamgr.cgi $(ss5_share)/ ; \ + cp modules/mod_statistics/SS5Logo.jpg $(ss5_share)/ ; \ + cp modules/mod_balance/SS5Logo.jpg $(ss5_share)/ ; \ -+ fi ) ++ fi + + @( if [ $(OS) = "Linux" ] || [ $(OS) = "SunOS" ]; then \ + cp modules/mod_statistics/statmgr.cgi $(dst_dir)$(lib_path_base)/ss5/ ; \ @@ -38,7 +59,7 @@ @( if [ $(OS) = "Linux" ]; then \ if [ ! -d $(dst_dir)/etc/rc.d/init.d ]; then mkdir -p $(dst_dir)/etc/rc.d/init.d; fi ; \ -@@ -67,10 +83,6 @@ +@@ -67,47 +76,52 @@ install: if [ ! -f $(dst_dir)/etc/init.d/ss5 ]; then cp conf/ss5.init $(dst_dir)/etc/init.d/ss5; \ else cp conf/ss5.init $(dst_dir)/etc/init.d/ss5.rpmnew ; fi ; \ fi ) @@ -48,11 +69,13 @@ - fi ) @( if [ ! -d $(dst_dir)$(doc_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(doc_path_base)/ss5; fi ) - @( cp License $(dst_dir)$(doc_path_base)/ss5 ) -@@ -80,32 +92,47 @@ - @( cp modules/mod_balance/README.balamgr $(dst_dir)$(doc_path_base)/ss5 ) - - @( if [ ! -d $(dst_dir)$(man_path_base)/man1 ]; then mkdir -p $(dst_dir)$(man_path_base)/man1; fi ) +- @( cp License $(dst_dir)$(doc_path_base)/ss5 ) +- @( cp -r doc/ldap/* $(dst_dir)$(doc_path_base)/ss5 ) +- @( cp -r doc/pam/* $(dst_dir)$(doc_path_base)/ss5 ) +- @( cp modules/mod_statistics/README.statmgr $(dst_dir)$(doc_path_base)/ss5 ) +- @( cp modules/mod_balance/README.balamgr $(dst_dir)$(doc_path_base)/ss5 ) +- +- @( if [ ! -d $(dst_dir)$(man_path_base)/man1 ]; then mkdir -p $(dst_dir)$(man_path_base)/man1; fi ) - @( cp man/$(OS)/ss5.1* $(dst_dir)$(man_path_base)/man1 ) - @( cp man/$(OS)/ss5srv.1* $(dst_dir)$(man_path_base)/man1 ) - @( if [ ! -d $(dst_dir)$(man_path_base)/man5 ]; then mkdir -p $(dst_dir)$(man_path_base)/man5; fi ) @@ -62,36 +85,46 @@ - @( cp man/$(OS)/ss5.conf.5* $(dst_dir)$(man_path_base)/man5 ) - @( cp man/$(OS)/ss5_gss.5* $(dst_dir)$(man_path_base)/man5 ) - @( cp man/$(OS)/ss5_supa.5* $(dst_dir)$(man_path_base)/man5 ) -+ @( if [ $(OS) = "FreeBSD" ] && [ ! -d $(ss5_man)/man1 ]; then mkdir -p $(ss5_man)/man1; fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.1* $(ss5_man)/man1/; \ -+ else cp man/$(OS)/ss5.1* $(dst_dir)$(man_path_base)/man1/; fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5srv.1* $(ss5_man)/man1/; \ -+ else cp man/$(OS)/ss5srv.1* $(dst_dir)$(man_path_base)/man1/; fi ) -+ @( if [ ! -d $(dst_dir)$(man_path_base)/man5 ]; then mkdir -p $(dst_dir)$(man_path_base)/man5/; fi ) -+ @( if [ $(OS) = "FreeBSD" ] && [ ! -d $(ss5_man)/man5 ]; then mkdir -p $(ss5_man)/man5; fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.passwd.5* $(ss5_man)/man5/; \ -+ else cp man/$(OS)/ss5.passwd.5* $(dst_dir)$(man_path_base)/man5/; fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.ha.5* $(ss5_man)/man5/; \ -+ else cp man/$(OS)/ss5.ha.5* $(dst_dir)$(man_path_base)/man5/; fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.pam.5* $(ss5_man)/man5/; \ -+ else cp man/$(OS)/ss5.pam.5* $(dst_dir)$(man_path_base)/man5/; fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5.conf.5* $(ss5_man)/man5/; \ -+ else cp man/$(OS)/ss5.conf.5* $(dst_dir)$(man_path_base)/man5/; fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5_gss.5* $(ss5_man)/man5/; \ -+ else cp man/$(OS)/ss5_gss.5* $(dst_dir)$(man_path_base)/man5/; fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then cp man/$(OS)/ss5_supa.5* $(ss5_man)/man5/; \ -+ else cp man/$(OS)/ss5_supa.5* $(dst_dir)$(man_path_base)/man5/; fi ) - - @( if [ ! -d $(dst_dir)$(conf_path_base) ]; then mkdir -p $(dst_dir)$(conf_path_base); fi ) - @( if [ ! -d $(dst_dir)$(conf_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(conf_path_base)/ss5; fi ) - @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.conf ]; then cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5; \ - else cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5/ss5.conf.rpmnew ; fi ) +- +- @( if [ ! -d $(dst_dir)$(conf_path_base) ]; then mkdir -p $(dst_dir)$(conf_path_base); fi ) +- @( if [ ! -d $(dst_dir)$(conf_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(conf_path_base)/ss5; fi ) +- @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.conf ]; then cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5; \ +- else cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5/ss5.conf.rpmnew ; fi ) - @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.ha ]; then cp conf/ss5.ha $(dst_dir)$(conf_path_base)/ss5; \ - else cp conf/ss5.ha $(dst_dir)$(conf_path_base)/ss5/ss5.ha.rpmnew ; fi ) - @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; \ - else cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5/ss5.passwd.rpmnew ; fi ) -+ @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.ha ]; then cp conf/ss5.ha $(dst_dir)$(conf_path_base)/ss5; fi ) -+ @( if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; fi ) ++ cp License $(dst_dir)$(doc_path_base)/ss5 ++ cp -r doc/ldap/README.ldap $(dst_dir)$(doc_path_base)/ss5 ++ cp -r doc/pam/README.pam $(dst_dir)$(doc_path_base)/ss5 ++ cp modules/mod_statistics/README.statmgr $(dst_dir)$(doc_path_base)/ss5 ++ cp modules/mod_balance/README.balamgr $(dst_dir)$(doc_path_base)/ss5 ++ ++ if [ $(OS) = "FreeBSD" ]; then \ ++ cp man/$(OS)/ss5.1* $(ss5_man)/man1/; \ ++ cp man/$(OS)/ss5srv.1* $(ss5_man)/man1/; \ ++ cp man/$(OS)/ss5.passwd.5* $(ss5_man)/man5/; \ ++ cp man/$(OS)/ss5.ha.5* $(ss5_man)/man5/; \ ++ cp man/$(OS)/ss5.pam.5* $(ss5_man)/man5/; \ ++ cp man/$(OS)/ss5.conf.5* $(ss5_man)/man5/; \ ++ cp man/$(OS)/ss5_gss.5* $(ss5_man)/man5/; \ ++ cp man/$(OS)/ss5_supa.5* $(ss5_man)/man5/; \ ++ else \ ++ cp man/$(OS)/ss5.1* $(dst_dir)$(man_path_base)/man1/; \ ++ cp man/$(OS)/ss5srv.1* $(dst_dir)$(man_path_base)/man1/; \ ++ cp man/$(OS)/ss5.passwd.5* $(dst_dir)$(man_path_base)/man5/; \ ++ cp man/$(OS)/ss5.ha.5* $(dst_dir)$(man_path_base)/man5/; \ ++ cp man/$(OS)/ss5.pam.5* $(dst_dir)$(man_path_base)/man5/; \ ++ cp man/$(OS)/ss5.conf.5* $(dst_dir)$(man_path_base)/man5/; \ ++ cp man/$(OS)/ss5_gss.5* $(dst_dir)$(man_path_base)/man5/; \ ++ cp man/$(OS)/ss5_supa.5* $(dst_dir)$(man_path_base)/man5/; \ ++ fi ++ ++ if [ ! -d $(dst_dir)$(conf_path_base) ]; then mkdir -p $(dst_dir)$(conf_path_base); fi ++ if [ ! -d $(dst_dir)$(conf_path_base)/ss5 ]; then mkdir -p $(dst_dir)$(conf_path_base)/ss5; fi ++ if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.conf ]; then cp conf/ss5.conf $(dst_dir)$(conf_path_base)/ss5; fi ++ if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.ha ]; then cp conf/ss5.ha $(dst_dir)$(conf_path_base)/ss5; fi ++ if [ ! -f $(dst_dir)$(conf_path_base)/ss5/ss5.passwd ]; then cp conf/ss5.passwd $(dst_dir)$(conf_path_base)/ss5; fi - @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \ + @( if [ $(OS) = "Linux" ]; then \ @@ -102,84 +135,12 @@ if [ ! -f $(dst_dir)/etc/pam.d/ss5 ]; then cp doc/pam/examples/ss5.pam $(dst_dir)/etc/pam.d/ss5; \ else cp doc/pam/examples/ss5.pam $(dst_dir)/etc/pam.d/ss5.rpmnew ; fi ; \ fi ) -+ @( if [ $(OS) = "FreeBSD" ]; then \ -+ if [ ! -d $(ss5_examples) ]; then mkdir -p $(ss5_examples); fi; \ -+ if [ ! -f $(ss5_examples) ]; then cp doc/pam/examples/ss5.pam $(ss5_examples); \ -+ cp doc/ldap/examples/* $(ss5_examples); \ -+ rm -rf /usr/local/share/doc/ss5/examples/; \ -+ fi; \ -+ fi ) - - @( if [ ! -d $(dst_dir)/var/run/ss5 ]; then mkdir -p $(dst_dir)/var/run/ss5; fi ) - -@@ -122,40 +149,68 @@ - @( if [ -d $(dst_dir)$(doc_path_base)/ss5 ]; then rm -rf $(dst_dir)$(doc_path_base)/ss5; fi ) ++ if [ $(OS) = "FreeBSD" ]; then \ ++ mkdir -p $(ss5_examples); \ ++ cp doc/ldap/examples/* doc/pam/examples/ss5.pam $(ss5_examples); \ ++ fi - @( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1; fi ) -+ @( if [ -f $(ss5_man)/man1/ss5.1 ]; then rm -f $(ss5_man)/man1/ss5.1; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man1/ss5srv.1 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5srv.1; fi ) -+ @( if [ -f $(ss5_man)/man1/ss5srv.1 ]; then rm -f $(ss5_man)/man1/ss5srv.1; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5 ]; then rm -f $(ss5_man)/man5/ss5.passwd.5; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.ha.5 ]; then rm -f $(ss5_man)/man5/ss5.ha.5; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.conf.5 ]; then rm -f $(ss5_man)/man5/ss5.conf.5; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.pam.5 ]; then rm -f $(ss5_man)/man5/ss5.pam.5; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5_gss.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5_gss.5; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5_gss.5 ]; then rm -f $(ss5_man)/man5/ss5_gss.5; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5_supa.5 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5_supa.5; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5_supa.5 ]; then rm -f $(ss5_man)/man5/ss5_supa.5; fi ) +- @( if [ ! -d $(dst_dir)/var/run/ss5 ]; then mkdir -p $(dst_dir)/var/run/ss5; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1.gz ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1.gz; fi ) -+ @( if [ -f $(ss5_man)/man1/ss5.1.gz ]; then rm -f $(ss5_man)/man1/ss5.1.gz; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man1/ss5srv.1.gz ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5srv.1.gz; fi ) -+ @( if [ -f $(ss5_man)/man1/ss5srv.1.gz ]; then rm -f $(ss5_man)/man1/ss5srv.1.gz; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.gz; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5.gz ]; then rm -f $(ss5_man)/man5/ss5.passwd.5.gz; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5.gz; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.ha.5.gz ]; then rm -f $(ss5_man)/man5/ss5.ha.5.gz; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.gz; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.conf.5.gz ]; then rm -f $(ss5_man)/man5/ss5.conf.5.gz; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.gz; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.pam.5.gz ]; then rm -f $(ss5_man)/man5/ss5.pam.5.gz; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5_gss.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5_gss.5.gz; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5_gss.5.gz ]; then rm -f $(ss5_man)/man5/ss5_gss.5.gz; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5_supa.5.gz ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5_supa.5.gz; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5_supa.5.gz ]; then rm -f $(ss5_man)/man5/ss5_supa.5.gz; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man1/ss5.1.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5.1.bz2; fi ) -+ @( if [ -f $(ss5_man)/man1/ss5.1.bz2 ]; then rm -f $(ss5_man)/man1/ss5.1.bz2; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man1/ss5srv.1.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man1/ss5srv.1.bz2; fi ) -+ @( if [ -f $(ss5_man)/man1/ss5srv.1.bz2 ]; then rm -f $(ss5_man)/man1/ss5srv.1.bz2; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.passwd.5.bz2; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.passwd.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.passwd.5.bz2; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.ha.5.bz2; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.ha.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.ha.5.bz2; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.conf.5.bz2; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.conf.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.conf.5.bz2; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5.pam.5.bz2; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5.pam.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5.pam.5.bz2; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5_gss.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5_gss.5.bz2; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5_gss.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5_gss.5.bz2; fi ) - @( if [ -f $(dst_dir)$(man_path_base)/man5/ss5_supa.5.bz2 ]; then rm -f $(dst_dir)$(man_path_base)/man5/ss5_supa.5.bz2; fi ) -+ @( if [ -f $(ss5_man)/man5/ss5_supa.5.bz2 ]; then rm -f $(ss5_man)/man5/ss5_supa.5.bz2; fi ) - - @( if [ -d $(dst_dir)$(conf_path_base)/ss5 ]; then rm -rf $(dst_dir)$(conf_path_base)/ss5; fi ) - -- @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \ -+ @( if [ $(OS) = "Linux" ]; then \ - if [ -f $(dst_dir)/etc/pam.d/ss5 ]; then rm -f $(dst_dir)/etc/pam.d/ss5; fi ; \ - fi ) - -+ @( if [ $(OS) = "FreeBSD" ]; then \ -+ if [ -d $(ss5_examples) ]; then rm -rf $(ss5_examples); fi ; \ -+ fi ) -+ - @( if [ $(OS) = "Linux" ] || [ $(OS) = "FreeBSD" ]; then \ -- if [ -f $(dst_dir)$(boot_path_base)/ss5 ]; then rm -f $(dst_dir)$(boot_path_base)/ss5; fi; \ -+ if [ -f $(dst_dir)$(boot_path_base)/ss5 ]; then rm -rf $(dst_dir)$(boot_path_base)/ss5; fi; \ - fi ) - - @( if [ $(OS) = "Linux" ]; then \ + .PHONY : uninstall diff --git a/net/ss5/files/patch-configure b/net/ss5/files/patch-configure new file mode 100644 index 000000000000..aa016bd67ecd --- /dev/null +++ b/net/ss5/files/patch-configure @@ -0,0 +1,22 @@ +--- configure.orig 2009-07-17 16:03:06.000000000 -0500 ++++ configure +@@ -1843,7 +1843,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_config_headers="$ac_config_headers include/config.h" + + +-OS=`uname -s` ++OS=FreeBSD + + if test "$OS" = "FreeBSD"; then + lib_path_base="/usr/local/lib" +@@ -6430,8 +6430,8 @@ if test "$OS" = "SunOS"; then + LIBS="-lsocket -lnsl -lssl -ldl -lldap -lpam" + fi; + if test "$OS" = "FreeBSD"; then +- CFLAGS="$CFLAGS -DFREEBSD -pthread -export-dynamic -I/usr/local/include" +- LIBS="-lpam -lldap -lc -L /usr/local/lib" ++ CFLAGS="$CFLAGS -DFREEBSD -pthread -I/usr/local/include" ++ LIBS="-lpam -lcrypto -lldap -lc -L /usr/local/lib -Wl,-export-dynamic" + CPP="g++" + fi; + diff --git a/net/ss5/files/patch-include_SS5Debug.h b/net/ss5/files/patch-include_SS5Debug.h new file mode 100644 index 000000000000..8c39236f1785 --- /dev/null +++ b/net/ss5/files/patch-include_SS5Debug.h @@ -0,0 +1,47 @@ +--- include/SS5Debug.h.orig 2009-08-02 01:58:07.000000000 -0500 ++++ include/SS5Debug.h +@@ -19,37 +19,37 @@ + #ifndef SS5DEBUG_H + #define SS5DEBUG_H 1 + +-inline void ++void + S5DebugMethodInfo( pid_t pid, + struct _SS5ClientInfo ci + ); + +-inline void ++void + S5DebugAuthInfo( pid_t pid, + struct _SS5ClientInfo ci + ); + +-inline void ++void + S5DebugRequestInfo( pid_t pid, + struct _SS5RequestInfo ri + ); + +-inline void ++void + S5DebugUdpRequestInfo( pid_t pid, + struct _SS5RequestInfo ri + ); + +-inline void ++void + S5DebugUpstreamInfo( pid_t pid, + struct _SS5RequestInfo ri + ); + +-inline void ++void + S5DebugFacilities( pid_t pid, + struct _SS5Facilities fa + ); + +-inline void ++void + S5DebugStatistics( pid_t pid + ); + diff --git a/net/ss5/files/patch-include_SS5Server.h b/net/ss5/files/patch-include_SS5Server.h new file mode 100644 index 000000000000..42b023474374 --- /dev/null +++ b/net/ss5/files/patch-include_SS5Server.h @@ -0,0 +1,11 @@ +--- include/SS5Server.h.orig 2009-08-02 01:58:07.000000000 -0500 ++++ include/SS5Server.h +@@ -31,7 +31,7 @@ UINT + S5ServerClose( int exitcode + ); + +-inline UINT ++UINT + S5ChildClose( int exitcode, + UINT childSocket, + struct _SS5ClientInfo *ci diff --git a/net/ss5/files/patch-src-SS5Server.c b/net/ss5/files/patch-src-SS5Server.c new file mode 100644 index 000000000000..26499fc11bce --- /dev/null +++ b/net/ss5/files/patch-src-SS5Server.c @@ -0,0 +1,11 @@ +--- src/SS5Server.c.orig 2009-08-02 01:57:19.000000000 -0500 ++++ src/SS5Server.c 2013-03-05 19:49:44.744425659 -0600 +@@ -44,6 +44,8 @@ + SS5SocksOpt.PreforkProcesses = 1; + SS5SocksOpt.PropagateKey = 0; + SS5SocksOpt.Role = ALONE; ++ SS5SocksOpt.SyslogFa = LOG_LOCAL6; ++ SS5SocksOpt.SyslogLe = LOG_ERR; + S5Radius.AuthPort = RADIUS_AUTH_PORT; + S5Radius.AcctPort = RADIUS_ACCT_PORT; + diff --git a/net/ss5/pkg-plist b/net/ss5/pkg-plist index ecc1dfdba216..40a9400e4d72 100644 --- a/net/ss5/pkg-plist +++ b/net/ss5/pkg-plist @@ -1,8 +1,6 @@ -@unexec if cmp -s %D/etc/ss5/ss5.ha %D/etc/ss5/ss5.ha.default; then rm -f %D/etc/ss5/ss5.ha; fi -etc/ss5/ss5.ha.default -@exec if [ ! -f %D/etc/ss5/ss5.ha ]; then cp %B/%f %D/etc/ss5/ss5.ha; fi -etc/ss5/ss5.conf -etc/ss5/ss5.passwd +@sample etc/ss5/ss5.ha.sample +@sample etc/ss5/ss5.conf.sample +@sample etc/ss5/ss5.passwd.sample lib/ss5/mod_authentication.so lib/ss5/mod_authorization.so lib/ss5/mod_balance.so @@ -14,6 +12,14 @@ lib/ss5/mod_proxy.so lib/ss5/mod_socks4.so lib/ss5/mod_socks5.so lib/ss5/mod_statistics.so +man/man1/ss5.1.gz +man/man1/ss5srv.1.gz +man/man5/ss5.conf.5.gz +man/man5/ss5.pam.5.gz +man/man5/ss5.passwd.5.gz +man/man5/ss5.ha.5.gz +man/man5/ss5_gss.5.gz +man/man5/ss5_supa.5.gz sbin/ss5 sbin/ss5srv %%DATADIR%%/SS5Logo.jpg @@ -27,6 +33,8 @@ sbin/ss5srv %%DOCSDIR%%/README.ldap %%DOCSDIR%%/README.pam %%DOCSDIR%%/README.statmgr +@exec mkdir -p /var/run/ss5 +@unexec rmdir >/dev/null 2>&1 /var/log/ss5 || : @dirrm %%DATADIR%% @dirrm %%DOCSDIR%% @dirrm %%EXAMPLESDIR%% |