From 103cf8b2ebc990a52011b7b0adeab45dc63ee99d Mon Sep 17 00:00:00 2001 From: Marcin Deranek Date: Mon, 29 Sep 2014 09:02:24 +0200 Subject: Initial commit --- net-mail/sympa/Manifest | 21 ++ net-mail/sympa/files/sympa-5.4.Makefile.am.patch | 63 +++++ .../files/sympa-5.4.gentoo_default_config.patch | 47 ++++ net-mail/sympa/files/sympa-5.4.initd | 49 ++++ net-mail/sympa/files/sympa-5.4.locale.patch | 19 ++ net-mail/sympa/files/sympa-5.4.moderation.patch | 82 +++++++ net-mail/sympa/files/sympa-6.0.fix.defaults.patch | 11 + net-mail/sympa/files/sympa-6.0.initd | 53 +++++ net-mail/sympa/files/sympa-6.1.initd | 56 +++++ net-mail/sympa/files/sympa-apache.conf | 11 + net-mail/sympa/files/sympa-apache_soap.conf | 11 + net-mail/sympa/files/sympa-lighttpd.conf | 14 ++ net-mail/sympa/files/sympa-lighttpd_soap.conf | 14 ++ net-mail/sympa/files/sympa-nginx.conf | 9 + net-mail/sympa/sympa-5.4.7.ebuild | 251 +++++++++++++++++++ net-mail/sympa/sympa-5.4.9999.ebuild | 251 +++++++++++++++++++ net-mail/sympa/sympa-6.0.6.ebuild | 263 ++++++++++++++++++++ net-mail/sympa/sympa-6.0.9999.ebuild | 263 ++++++++++++++++++++ net-mail/sympa/sympa-6.1.20.ebuild | 265 +++++++++++++++++++++ 19 files changed, 1753 insertions(+) create mode 100644 net-mail/sympa/Manifest create mode 100644 net-mail/sympa/files/sympa-5.4.Makefile.am.patch create mode 100644 net-mail/sympa/files/sympa-5.4.gentoo_default_config.patch create mode 100644 net-mail/sympa/files/sympa-5.4.initd create mode 100644 net-mail/sympa/files/sympa-5.4.locale.patch create mode 100644 net-mail/sympa/files/sympa-5.4.moderation.patch create mode 100644 net-mail/sympa/files/sympa-6.0.fix.defaults.patch create mode 100644 net-mail/sympa/files/sympa-6.0.initd create mode 100644 net-mail/sympa/files/sympa-6.1.initd create mode 100644 net-mail/sympa/files/sympa-apache.conf create mode 100644 net-mail/sympa/files/sympa-apache_soap.conf create mode 100644 net-mail/sympa/files/sympa-lighttpd.conf create mode 100644 net-mail/sympa/files/sympa-lighttpd_soap.conf create mode 100644 net-mail/sympa/files/sympa-nginx.conf create mode 100644 net-mail/sympa/sympa-5.4.7.ebuild create mode 100644 net-mail/sympa/sympa-5.4.9999.ebuild create mode 100644 net-mail/sympa/sympa-6.0.6.ebuild create mode 100644 net-mail/sympa/sympa-6.0.9999.ebuild create mode 100644 net-mail/sympa/sympa-6.1.20.ebuild (limited to 'net-mail') diff --git a/net-mail/sympa/Manifest b/net-mail/sympa/Manifest new file mode 100644 index 0000000..cb716ce --- /dev/null +++ b/net-mail/sympa/Manifest @@ -0,0 +1,21 @@ +AUX sympa-5.4.Makefile.am.patch 2540 SHA256 76dbb81c0eed47cb9a00978feb4b7d4e5d6404fdb3aec92d82b654c1abfeed1a SHA512 17cfad32f4392904b8a96203c82b9ee8fc95e0693154cad2530d9cb73aba387a9dac2dec10a1d018f5988c0b38735b15c41a4283672a208fd9e0881d319b0aea WHIRLPOOL 7784beafaba0f213c13bc5d0e043245a045fdbac467a5b018a745c9320e64542016e4c738f647e39ebba660b3160e9f1cf42d882af41edfae500818f1db28810 +AUX sympa-5.4.gentoo_default_config.patch 1835 SHA256 5af1b9345746be753fc7b781434462c7ae99b39cbd248d01cdd88751849719c1 SHA512 266daea49fa224ff6f755f260ea5cd872721c01bbc245463c7e19bcb5ee1b0378222a9cc771cc762f2a8de1fde6a555ffef932ae4f7b0eb0a845d66f8634826f WHIRLPOOL db4dfddfb454766e1884b7164842cb9e0a147e5f83ca1bbfb5448de217da0a2aaf3e1a9da2014043f52efd0c18bd92d82f117deae69810d5eba4ff512cbdbb33 +AUX sympa-5.4.initd 1008 SHA256 155ca44a4ff7a75f417d0300dad7f3b3da46e332fd6535ba6ff4c527ee36d9d3 SHA512 c2f57277af2f54ed67abff5b875e26607608c8bfa689f83d1db3ff235d08bf89d0a14eca4d2a3ee0fb19bd016fda61a4adb3984ad12f51f6e057ab540125eb98 WHIRLPOOL 08705e1191750605b5736460a4af936ebc34935755ba04272e6a289fd4c3ed01bb2678f66b24a8a6b0720ee891e3bbaac07f5f388dcb1c828aa0d22417ee2433 +AUX sympa-5.4.locale.patch 614 SHA256 469eae733892a94fc8cc657974c9d3403edbc86162b531070729d58405872b71 SHA512 28565c9dc260c3bfadda187557053d01f23d0f66cc486787994ea22c425d4f7d41987b5e307476948fa6ed873a64ad2312d9a8b549c778a68a3b8ca1b46eb40d WHIRLPOOL 66444cb6323a8ddeebc5e9d534b6c62b3a3eb4aec4af6e03a62e963d76e96b9f8041ae26b5890ce8ab25e00013536a8d6205b7969f33344a6ce0e2c8cfd80c98 +AUX sympa-5.4.moderation.patch 2687 SHA256 21115b8f0933f7eaa20b0551e7dbd2dd14301229fe1550fde473ef110633cdb6 SHA512 da0a4683b4b37ed6916b7957a07d7d59eabc06c2ed4ba8de6b026a0887fdaa0081b9e8ca1969e73b737e0b7d01012884c55cb63d2ab12b53c5e6fdd94b01fd42 WHIRLPOOL c87652534a567746c97421eeb1c1c57e0d2b9ac2f92d85a5642e94a2d16d6a9a29e6bdbe887e3a6172312804719707adafaa6057428d422975ed5fecf7d5b758 +AUX sympa-6.0.fix.defaults.patch 401 SHA256 7357c52a147290a794865ad640122d085a53ae014425c5768b63c894e68577f1 SHA512 21a35317a611c55aaba19c7da3d158b0fa38481b4cd98c9ae23b8004491acb0b3aa59d2a8536346a349415b422f83f7a917df88a53f0c1caacf63f7acf5cbaf4 WHIRLPOOL 290516c92d6b181b47048d7f189a279c9409f205a8d6c899afeea543873970c6af956c657b73439b9f971f843045380fca9d8a58c5a2cd82735e368699fd659a +AUX sympa-6.0.initd 1100 SHA256 d21c3af4657cee37f9539f96ea44dfa0963a6193a23e64d7cc47b80b5d9bd559 SHA512 e1015494bcfaaf0835b6db8b4297a69142f0c7fe4f3b63f319d46ea25ff8c26f67b86584eda74a30ad41b3bbd8f58e53923aa53f5fd436ed4b9777512b4c6afe WHIRLPOOL ab49102df67d079765a75af29f609554acc96e9c5e9a5f22c6f507d5fc61677afceb73ee568ce069fe27498d949ed3635effeeb948ad7e65be6a4697ebc0a2bf +AUX sympa-6.1.initd 1219 SHA256 405c78564c6ea91269e412c7dabc0b89346b95e3e36a38650aca05db417dc594 SHA512 f8488713f5997b41d7c3d4af4db4fe2b6121c10a1660d3aa24b0332e7b2881266469adc996f01e724b22b5a70e773e21813c9400633d3efe3e20b0b8177af465 WHIRLPOOL dae2ab6b8134d9a968b31303404202b2f9274ff198a5f5b5d69255bde6f2e0cfc7e447a5d8e4c4cd441947b90a3d9d1b02268b4a0fe245abb9a43436db744223 +AUX sympa-apache.conf 307 SHA256 a8fd4f14ce7c1e3106959e4a4d7e0a35224836e1a255c590ca7d131f9049f31b SHA512 26a132c6e8fd1aec951f5755351d2ec69c34dd213a2249cb0b995938cfdf7c1ec50fe5c11780cfb0da953ba00e9fee5c6846cc5beb486b1d6e0716d0c7695486 WHIRLPOOL ac084649ada894fa1b417adb5920f6f8a2a36fbdd887ba38690880269a8537ede85eebced3b3ab8794c46e6fa5d806b4d5df95c5f42dea5739517d331458e5e4 +AUX sympa-apache_soap.conf 332 SHA256 1c932855fd8b3cf95161fe3e9e160fc74fe117765a195b4cc4151be6ee578470 SHA512 f54c45f0a5b49fb3e687a17ad8982c6f6cab667959ed92d2ee56f231b3bcf378b267adb3c32b26597c3af625e88f9dfdfe0cbe58a20153d224bb5f107b681891 WHIRLPOOL b8969ad5d0b65ab3d95bbabf5c9387ced341e58eb150bc9f6ca724b770d9c15ad10a6f952f00f9be32dc5a26f3219d6264a92a0881264290fd9c74eddc707b59 +AUX sympa-lighttpd.conf 372 SHA256 b2030ba7f0359d2a6cc854303a400e749089ac0275360918db586a54f11e7fdc SHA512 765ec8521fe426da3c17186a8820982388cc6678fb038473de7310d15aa789b902df2edd055e82bfc98cc7161a2728f9f685f2da5862c466635a901d47f301e5 WHIRLPOOL 239d67568609f38aa1a9c7a3c599fa210e970a8521a62d88eabfc1d6016a4b05a79c922781310b9e48951b7dbe0a62b2fd1585129de4baf6f4df6b0aae807f7f +AUX sympa-lighttpd_soap.conf 382 SHA256 4607711b4a759325ec6ede28a402bbc0f1c6f6054ba99f766d24b14989bb4ede SHA512 1aac44ca4c410d90e384ac092cfbb2ead8a144ed472998266ccc9b1411e6ce6d4c02edbf46496c14585c65cfbf23cf8276901df2d54895bdf4edd3cecf447f2d WHIRLPOOL 19ebe069e64f70723bf7e9f0d51d923e62006518f3840eae24f8fafb49ab99f7829e3cca56cb2baf849388fc0bf440dd3ffdb51c160faeab7aeea767af312c6d +AUX sympa-nginx.conf 252 SHA256 dc364f1135c8cc9eecd8646f1bb9ea29b8fbce64de6ca884a85e248dabe1f669 SHA512 076900022f1d6c03e26301ed15514dc922a9ba9718c8a344722ad755c5caf0277daae944959f061445f58ef163d6d243670fb97b92f06e6370a1f8621762221f WHIRLPOOL 23f74cc4c2eb5555b9d46ed7f1222acc8e65d383cebaefad352abe717c1d84f4536a350237ca0c74508b376018160f8f0c027054482b12b025849c137e62cd3e +DIST sympa-5.4.7.tar.gz 6622044 SHA256 f35e123fbe4cf296893e90f06565f32ffbf54805af076e77c525f9a932a530a4 SHA512 73e3bf3eb39e46b172970306068606a1d039877358fdc0b3edeaeb7d06f85091d80f4e4e55e48efe30a1e5ee7ba1d35d6ca9db9bc4e86efbc1d94363519e2c2a WHIRLPOOL 374542fd4f5d66c373e01db507adc1fb4d076484feeeac62a6d3b77f6098b57998f1fc847e0bc569b20b19c90f07436b38809bbbd361d02f935360ac979fbf32 +DIST sympa-6.0.6.tar.gz 6731221 SHA256 8af9c4f8518b7f41a6a46f50fd39e8382b4d2451389d80f6fda2ab112abc8c45 SHA512 d34eced0d268903bc089b9b0a4ac2d79459b9274dead37b9ebeb64c72b7258b7d3e3eda949d897c384043bf2e39b7761ac9452075efa5612ce42f8066794692d WHIRLPOOL 6a98686c866939036c9661e5567cead0319ab9737fbe654a52a3a775e2358674d83c85f35bad581964c2b7c00d5e198828fa1cd3a5a44d0feddd571da7c72e0a +DIST sympa-6.1.20.tar.gz 8267233 SHA256 b0afe73166e9c3427944bd47bfb07143bfc4a749a468e060370c5fe8c0b75dc5 SHA512 0c3809dddeafa1d7491e20606c1ad8e00373bb373ec33edb733cefba1d8ed2244509e2a430d8416cd458d68c83bf4a2ff0a29306c1c5c79aeeb65ef1dc724abe WHIRLPOOL c62e121db0bd17ec99552aa96f5e702fd003074cf46a1da6a1a46dbc5f9b93827aaade001097f6e4d6c5be0e5706d7717fc45baead1f398ac585c0a32fab9bec +EBUILD sympa-5.4.7.ebuild 7504 SHA256 a1d5a8fe971764bb06611b9cf0e0472b7753b04968cb76caead4d4790a71b2fb SHA512 f7fb2347bdb0927b4762f75fc1ab11070a4ab10692df87d0d1c9837f5da03091d4606a39863e89a381e2ffbdc8b52d6a953c9917cf9549a1acb5eea296f1acb2 WHIRLPOOL 22c6138c1c3aff547db851c74f93c2df7bf118afe65258e8b6b29931c18feda78d5dbfa6cbfc054f437831f4daa733b1797f46c87e9f96625572e01215a24bb2 +EBUILD sympa-5.4.9999.ebuild 7493 SHA256 a0a48c5e6cd01d2c7ddecf95baa74646b3f2b1cb2496d6dc268ed7b460b5d829 SHA512 e47d2796227c084955e0600718232cbd09de53a21c03469f867430899aefe4f976c944302884bdbaee0b1a93bef99271b9e7b14b4d88e8b14e788bcef86d2087 WHIRLPOOL 4e02d376e38ec9a5c2f74c1d9b90fc8dcbbd59becb813b03ac6133474249eb255598be4cf84eb5143a7e41a179f8f8c33e40bfc00bc1dddbeae30a0390deba25 +EBUILD sympa-6.0.6.ebuild 7847 SHA256 c7d9da3c57a4c8377cd5422c5f825b8c258bdb5a04230fa67c99713aabbb8560 SHA512 aa9cbbaa0fe13a72ee2af178608b76ceb124a935cd7095eee0a94b5f94f97ff977cf88619c204e4e9e74f58e2e37367765b345a46694f04808d035e174d3097d WHIRLPOOL cea2357ea6c6985aced1e07f3b69d1faf0441bcea4f286ed761b8398d5382e1858962df371fb4c08dcb00aedad7827c796b997f77b0afd13206f8e9ada6767c7 +EBUILD sympa-6.0.9999.ebuild 7836 SHA256 8e63f782fa67a104cde2031cb0cb3c56933caa0c399cb383c867ad17542d4a9a SHA512 85dc5cd9978984b4c5371c33f4b43b51b335c946a04589ac75e564bee67a55a5ffdc65b8c7f35fb9bb6d08c39841e071c519ae75167180d9049598ef99ba5145 WHIRLPOOL 1b60ad8dc65bae7d888acbcde28e49866150d11e87030193d309193f7053369c500b699782b00aacf7379ad6e371b99af03c7eae309cd52f73989e0f90c104cc +EBUILD sympa-6.1.20.ebuild 7939 SHA256 4636b7f6cf1d11efd89b2c37c09ec1825b622c901e698214a96225b3d372b7c9 SHA512 8820b0d8f4294c534ef391878d8211ff60853a21f2d2bee4e111dd5ad79096c148ff3d1c9284cbd9e1f7e71e6b7c5bc4ffb8ae17cf82b35b86f5bc4f2c98d412 WHIRLPOOL c0dcac0bff9bd76d9ab9e813d8754f6255ce8b4dfaa4e598ef643613d68be398bc663858d6ee7e1c5091e492aa2387d9f5b1ae2d21772abc5e3ea79b5cdc1dbf diff --git a/net-mail/sympa/files/sympa-5.4.Makefile.am.patch b/net-mail/sympa/files/sympa-5.4.Makefile.am.patch new file mode 100644 index 0000000..228bc43 --- /dev/null +++ b/net-mail/sympa/files/sympa-5.4.Makefile.am.patch @@ -0,0 +1,63 @@ +--- Makefile.am.orig 2007-09-19 20:12:15.520640736 +0200 ++++ Makefile.am 2007-09-19 20:12:49.344926922 +0200 +@@ -134,7 +134,7 @@ + + SH = @SH@ + CC = @CC@ +-CFLAGS = -g ++CFLAGS = @CFLAGS@ + + # Aix4.2 (and some others unix), use gnu make ! + #MAKE = @MAKE@ +@@ -164,7 +163,7 @@ + LOG_SOCKET_TYPE = unix + #endif + +-all: warning checkperl checkcpan sources wrapper soap_wrapper man locale ++all: sources wrapper soap_wrapper man locale + + rpm: build_rh_rpm build_mdk_rpm + +@@ -259,7 +258,7 @@ + $(MAKE) PERL='${PERL}' clean) || exit 1; \ + done; + +-install: importantchanges installdir installsrc installwws installwebtt2 installmailtt2 installlocale installman installscript installsample installconfig installdoc installsoap nextstep ++install: installdir installsrc installwws installwebtt2 installmailtt2 installlocale installman installscript installsample installconfig installdoc installsoap nextstep + + nextstep: + @echo "" +@@ -339,7 +339,7 @@ + installwws: + @(cd wwsympa && echo "making in wwsympa..." && \ + $(MAKE) SH='${SH}' CC='${CC}' CFLAGS='${CFLAGS}' PERL='${PERL}' \ +- DIR='${DIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' \ ++ DIR='${DIR}' BINDIR='${BINDIR}' SBINDIR='${SBINDIR}' LIBDIR='${LIBDIR}' SPOOLDIR='${SPOOLDIR}' \ + USER='${USER}' GROUP='${GROUP}' SUDO='${SUDO}' enable_secure='${enable_secure}' \ + CGIDIR='${CGIDIR}' WWSBINDIR='${WWSBINDIR}' MAILERPROGDIR='${MAILERPROGDIR}' \ + PIDDIR='${PIDDIR}' CONFIG='${CONFIG}' WWSCONFIG='${WWSCONFIG}' ETCBINDIR='${ETCBINDIR}' \ +@@ -406,7 +406,7 @@ + + installdir: + @echo "Creating required directories" +- @for dir in $(DIR) $(EXPL_DIR) $(CONFDIR) $(SAMPLEDIR) $(ETCDIR) $(BINDIR) $(LOCALEDIR) $(DOCDIR) $(DIR)/static_content $(DIR)/static_content/icons ; do \ ++ @for dir in $(DIR) $(EXPL_DIR) $(CONFDIR) $(SAMPLEDIR) $(ETCDIR) $(BINDIR) $(LOCALEDIR) $(DOCDIR) $(SPOOLDIR)/static_content $(SPOOLDIR)/static_content/icons ; do \ + if [ ! -d $(DESTDIR)$$dir ] ; then \ + echo "Creating $(DESTDIR)$$dir"; \ + mkdir -p $(DESTDIR)$$dir; \ +@@ -473,14 +472,7 @@ + INITCONF='1'; \ + fi \ + fi \ +- done; \ +- if [ "$$INITCONF" ] ; then \ +- echo "###############################################"; \ +- echo "It seems to be your first installation of Sympa"; \ +- echo "The following wizard will help you create your $(CONFDIR)/sympa.conf and $(CONFDIR)/wwsympa.conf :"; \ +- DESTDIR=$(DESTDIR); export DESTDIR; \ +- $(PERL) -I $(DESTDIR)$(LIBDIR) $(DESTDIR)$(SBINDIR)/sympa_wizard.pl; \ +- fi ++ done; + + build_rh_rpm: clean + @echo "Building RedHat RPM in $(RPMTOPDIR) ..." diff --git a/net-mail/sympa/files/sympa-5.4.gentoo_default_config.patch b/net-mail/sympa/files/sympa-5.4.gentoo_default_config.patch new file mode 100644 index 0000000..abce32f --- /dev/null +++ b/net-mail/sympa/files/sympa-5.4.gentoo_default_config.patch @@ -0,0 +1,47 @@ +--- src/sympa_wizard.pl.orig 2007-03-04 11:41:19.000000000 +0100 ++++ src/sympa_wizard.pl 2007-09-16 19:24:00.377085123 +0200 +@@ -92,13 +92,13 @@ + 'advice' =>''}, + + {'name' => 'arc_path', +- 'default' => '--DIR--/arc', ++ 'default' => '--SPOOLDIR--/arc', + 'query' => 'Where to store HTML archives', + 'file' => 'wwsympa.conf','edit' => '1', + 'advice' =>'Better if not in a critical partition'}, + + {'name' => 'bounce_path', +- 'default' => '--DIR--/bounce', ++ 'default' => '--SPOOLDIR--/bounce', + 'query' => 'Where to store bounces', + 'file' => 'wwsympa.conf', + 'advice' =>'Better if not in a critical partition'}, +@@ -122,13 +122,13 @@ + 'advice' =>''}, + + {'name' => 'queuebounce', +- 'default' => '--SPOOLDIR--/bounce', ++ 'default' => '--SPOOLDIR--/qbounce', + 'query' => 'Bounce incoming spool', + 'file' => 'sympa.conf', + 'advice' =>''}, + + {'name' => 'static_content_path', +- 'default' => '--DIR--/static_content', ++ 'default' => '--SPOOLDIR--/static_content', + 'query' => 'The directory where Sympa stores static contents (CSS, members pictures, documentation) directly delivered by Apache', + 'file' => 'sympa.conf', + 'advice' =>''}, +--- wwsympa/Makefile.orig 2008-01-30 18:10:56.000000000 +0100 ++++ wwsympa/Makefile 2008-04-02 09:26:53.222445659 +0200 +@@ -100,8 +100,8 @@ + + installicons: + @echo "Installing icons..." +- @echo $(DESTDIR)$(DIR)/static_content/icons +- cp icons/*.png $(DESTDIR)$(DIR)/static_content/icons ++ @echo $(DESTDIR)$(SPOOLDIR)/static_content/icons ++ cp icons/*.png $(DESTDIR)$(SPOOLDIR)/static_content/icons + + installwrapper: + @echo "Installing wwsympa-wrapper binary..." diff --git a/net-mail/sympa/files/sympa-5.4.initd b/net-mail/sympa/files/sympa-5.4.initd new file mode 100644 index 0000000..9acb21c --- /dev/null +++ b/net-mail/sympa/files/sympa-5.4.initd @@ -0,0 +1,49 @@ +#!/sbin/runscript + +opts="depend start stop" +sympaconf="/etc/sympa/sympa.conf" +wwsympaconf="/etc/sympa/wwsympa.conf" +sympadir="/usr" +depend() { + use logger mysql postgres ldap + before apache apache2 lighttpd +} + +sympa_start() { + ebegin "Starting Sympa module $1.pl: " + local MY_PID="/var/run/sympa/$1.pid" + start-stop-daemon --start --quiet --pidfile ${MY_PID} --exec $sympadir/sbin/$1.pl + eend $? +} + +sympa_stop() { + ebegin "Stopping Sympa module $1.pl: " + local MY_PID="/var/run/sympa/$1.pid" + start-stop-daemon --stop --quiet --pidfile ${MY_PID} + eend $? +} + +start() { + #Check config files + if [ ! -f $sympaconf ]; then + eerror "Missing Sympa config!" + return 1 + fi + if [ ! -f $wwsympaconf ]; then + eerror "Missing WWSympa config!" + return 1 + fi + echo "Starting Sympa subsystems: " + sympa_start sympa + sympa_start bounced + sympa_start archived + sympa_start task_manager +} + +stop(){ + echo "Stopping Sympa subsystems: " + sympa_stop bounced + sympa_stop archived + sympa_stop sympa + sympa_stop task_manager +} diff --git a/net-mail/sympa/files/sympa-5.4.locale.patch b/net-mail/sympa/files/sympa-5.4.locale.patch new file mode 100644 index 0000000..d47ef07 --- /dev/null +++ b/net-mail/sympa/files/sympa-5.4.locale.patch @@ -0,0 +1,19 @@ +--- src/sympa.pl.orig 2008-04-25 11:14:22.778440706 +0200 ++++ src/sympa.pl 2008-04-25 11:15:04.042853056 +0200 +@@ -203,6 +203,7 @@ + ## Set locale configuration + $main::options{'lang'} =~ s/\.cat$//; ## Compatibility with version < 2.3.3 + $Language::default_lang = $main::options{'lang'} || $Conf{'lang'}; ++&Language::SetLang($Language::default_lang); + + ## Main program + if (!chdir($Conf{'home'})) { +@@ -827,8 +828,6 @@ + ## them, sleeps a while and continues the good job. + while (!$signal) { + +- &Language::SetLang($Language::default_lang); +- + &List::init_list_cache(); + + if (!opendir(DIR, $spool)) { diff --git a/net-mail/sympa/files/sympa-5.4.moderation.patch b/net-mail/sympa/files/sympa-5.4.moderation.patch new file mode 100644 index 0000000..8af00ea --- /dev/null +++ b/net-mail/sympa/files/sympa-5.4.moderation.patch @@ -0,0 +1,82 @@ +--- src/Commands.pm.orig 2008-05-02 10:31:47.000000000 +0200 ++++ src/Commands.pm 2008-10-08 21:45:39.270266973 +0200 +@@ -2027,11 +2027,12 @@ + my $modqueue = &Conf::get_robot_conf($robot,'queuemod') ; + + my $name = $list->{'name'}; +- my $file; ++ my $file, $dir; + + ## For compatibility concerns + foreach my $list_id ($list->get_list_id(),$list->{'name'}) { + $file = $modqueue.'/'.$list_id.'_'.$key; ++ $dir = $modqueue.'/.'.$list_id.'_'.$key; + last if (-f $file); + } + +@@ -2040,6 +2041,7 @@ + ## For compatibility concerns + foreach my $list_id ($list->get_list_id(),$list->{'name'}) { + $file = $modqueue.'/'.$list_id.'_'.$key.'.distribute'; ++ $dir = $modqueue.'/.'.$list_id.'_'.$key; + last if (-f $file); + } + } +@@ -2102,6 +2104,7 @@ + &do_log('info', 'Message for %s from %s moved in spool %s for distribution message-id=%s', $name, $sender, $Conf{'queuedistribute'},$hdr->get('Message-Id')); + } + unlink($file); ++ &tools::remove_dir($dir); + + return 1; + } +@@ -2318,11 +2321,12 @@ + &Language::SetLang($list->{'admin'}{'lang'}); + + my $name = "$list->{'name'}"; +- my $file; ++ my $file, $dir; + + ## For compatibility concerns + foreach my $list_id ($list->get_list_id(),$list->{'name'}) { + $file = $modqueue.'/'.$list_id.'_'.$key; ++ $dir = $modqueue.'/.'.$list_id.'_'.$key; + last if (-f $file); + } + +@@ -2386,6 +2390,7 @@ + close(IN); + &do_log('info', 'REJECT %s %s from %s accepted (%d seconds)', $name, $sender, $key, time-$time_command); + unlink($file); ++ &tools::remove_dir($dir); + + return 1; + } +--- wwsympa/wwsympa.fcgi.orig 2008-04-11 11:42:53.000000000 +0200 ++++ wwsympa/wwsympa.fcgi 2008-10-08 23:11:45.242256683 +0200 +@@ -6144,7 +6144,7 @@ + $in{'id'} =~ s/\0/,/g; + + &wwslog('info', 'do_reject(%s)', $in{'id'}); +- my ($msg, $file); ++ my ($msg, $file, $dir); + + unless ($param->{'list'}) { + &report::reject_report_web('user','missing_arg',{'argument' => 'list'},$param->{'action'}); +@@ -6188,6 +6188,7 @@ + ## For compatibility concerns + foreach my $list_id ($list->get_list_id(),$list->{'name'}) { + $file = $Conf{'queuemod'}.'/'.$list_id.'_'.$id; ++ $dir = $Conf{'queuemod'}.'/.'.$list_id.'_'.$id; + last if (-f $file); + } + +@@ -6234,7 +6235,7 @@ + } + close(IN); + +- unless (unlink($file)) { ++ unless (unlink($file) && &tools::remove_dir($dir)) { + &report::reject_report_web('intern','erase_file',{'file' => $file},$param->{'action'},$list,$param->{'user'}{'email'},$robot); + &wwslog('err','do_reject: failed to erase %s', $file); + &web_db_log({'parameters' => $in{'id'}, diff --git a/net-mail/sympa/files/sympa-6.0.fix.defaults.patch b/net-mail/sympa/files/sympa-6.0.fix.defaults.patch new file mode 100644 index 0000000..55ea608 --- /dev/null +++ b/net-mail/sympa/files/sympa-6.0.fix.defaults.patch @@ -0,0 +1,11 @@ +--- src/lib/confdef.pm.orig 2009-07-27 19:58:23.043761210 +0200 ++++ src/lib/confdef.pm 2009-07-27 20:05:05.871259383 +0200 +@@ -133,7 +133,7 @@ + }, + { + name => 'queuebounce', +- default => Sympa::Constants::SPOOLDIR . '/bounce', ++ default => Sympa::Constants::SPOOLDIR . '/qbounce', + query => 'Bounce incoming spool', + file => 'sympa.conf', + }, diff --git a/net-mail/sympa/files/sympa-6.0.initd b/net-mail/sympa/files/sympa-6.0.initd new file mode 100644 index 0000000..81b8321 --- /dev/null +++ b/net-mail/sympa/files/sympa-6.0.initd @@ -0,0 +1,53 @@ +#!/sbin/runscript + +opts="depend start stop" +sympaconf="/etc/sympa/sympa.conf" +wwsympaconf="/etc/sympa/wwsympa.conf" +sympadir="/usr" +depend() { + use logger mysql postgres ldap + before apache apache2 lighttpd +} + +sympa_start() { + ebegin "Starting Sympa module $1.pl: " + start-stop-daemon --start --quiet --pidfile /var/run/sympa/$1.pid --exec ${sympadir}/sbin/$1.pl + eend $? +} + +sympa_stop() { + if [ -f "/var/run/sympa/$1.pid" ]; then + ebegin "Stopping Sympa module $1.pl: " + start-stop-daemon --stop --quiet --pidfile /var/run/sympa/$1.pid + eend $? + fi +} + +start() { + #Check config files + if [ ! -f ${sympaconf} ]; then + eerror "Missing Sympa config!" + return 1 + fi + if [ ! -f ${wwsympaconf} ]; then + eerror "Missing WWSympa config!" + return 1 + fi + echo "Starting Sympa subsystems: " + sympa_start sympa + sympa_start bulk + sympa_start archived + sympa_start bounced + sympa_start task_manager +} + +stop(){ + echo "Stopping Sympa subsystems: " + sympa_stop bounced + sympa_stop archived + sympa_stop bulk + sympa_stop sympa + sympa_stop task_manager + sympa_stop sympa-distribute + sympa_stop sympa-creation +} diff --git a/net-mail/sympa/files/sympa-6.1.initd b/net-mail/sympa/files/sympa-6.1.initd new file mode 100644 index 0000000..4a96af8 --- /dev/null +++ b/net-mail/sympa/files/sympa-6.1.initd @@ -0,0 +1,56 @@ +#!/sbin/runscript + +sympaconf="/etc/sympa/sympa.conf" +wwsympaconf="/etc/sympa/wwsympa.conf" +data_structure="/etc/sympa/data_structure.version" +sympadir="/usr" + +depend() { + use logger mysql postgres ldap + before apache apache2 lighttpd +} + +sympa_start() { + ebegin "Starting Sympa module $1.pl: " + start-stop-daemon --start --quiet --pidfile /var/run/sympa/$1.pid --exec ${sympadir}/sbin/$1.pl + eend $? +} + +sympa_stop() { + if [ -f "/var/run/sympa/$1.pid" ]; then + ebegin "Stopping Sympa module $1.pl: " + start-stop-daemon --stop --retry 30 --quiet --pidfile /var/run/sympa/$1.pid + eend $? + fi +} + +start() { + if [ ! -f "${data_structure}" ]; then + eerror "Please run 'sympa.pl --upgrade' first" + return 1 + fi + # Check config files + if [ ! -f "${sympaconf}" ]; then + eerror "Missing Sympa config (${sympaconf})" + return 2 + fi + if [ ! -f "${wwsympaconf}" ]; then + eerror "Missing WWSympa config (${wwsympaconf})" + return 3 + fi + echo "Starting Sympa subsystems: " + sympa_start sympa + sympa_start bulk + sympa_start archived + sympa_start bounced + sympa_start task_manager +} + +stop(){ + echo "Stopping Sympa subsystems: " + sympa_stop task_manager + sympa_stop bounced + sympa_stop archived + sympa_stop bulk + sympa_stop sympa +} diff --git a/net-mail/sympa/files/sympa-apache.conf b/net-mail/sympa/files/sympa-apache.conf new file mode 100644 index 0000000..94098f8 --- /dev/null +++ b/net-mail/sympa/files/sympa-apache.conf @@ -0,0 +1,11 @@ +Alias /static-sympa /var/spool/sympa/static_content + + + ScriptAlias /sympa /usr/libexec/sympa/wwsympa-wrapper.fcgi + + FastCgiServer /usr/libexec/sympa/wwsympa-wrapper.fcgi -processes 2 + + SetHandler fastcgi-script + + + diff --git a/net-mail/sympa/files/sympa-apache_soap.conf b/net-mail/sympa/files/sympa-apache_soap.conf new file mode 100644 index 0000000..553df34 --- /dev/null +++ b/net-mail/sympa/files/sympa-apache_soap.conf @@ -0,0 +1,11 @@ +Alias /static-sympa /var/spool/sympa/static_content + + + ScriptAlias /sympa /usr/libexec/sympa/sympa_soap_server-wrapper.fcgi + + FastCgiServer /usr/libexec/sympa/sympa_soap_server-wrapper.fcgi -processes 2 + + SetHandler fastcgi-script + + + diff --git a/net-mail/sympa/files/sympa-lighttpd.conf b/net-mail/sympa/files/sympa-lighttpd.conf new file mode 100644 index 0000000..7023086 --- /dev/null +++ b/net-mail/sympa/files/sympa-lighttpd.conf @@ -0,0 +1,14 @@ +server.modules += ("mod_fastcgi") + +alias.url += ( "/static-sympa/" => "/var/spool/sympa/static_content/" ) + +$HTTP["url"] =~ "^/sympa" { +fastcgi.server = ( "/sympa" => + (( "check-local" => "disable", + "bin-path" => "/usr/libexec/sympa/wwsympa-wrapper.fcgi", + "socket" => "/var/run/lighttpd/sympa.sock", + "max-procs" => 2, + "idle-timeout" => 20, + )) + ) +} diff --git a/net-mail/sympa/files/sympa-lighttpd_soap.conf b/net-mail/sympa/files/sympa-lighttpd_soap.conf new file mode 100644 index 0000000..121114f --- /dev/null +++ b/net-mail/sympa/files/sympa-lighttpd_soap.conf @@ -0,0 +1,14 @@ +server.modules += ("mod_fastcgi") + +alias.url += ( "/static-sympa/" => "/var/spool/sympa/static_content/" ) + +$HTTP["url"] =~ "^/sympa" { +fastcgi.server = ( "/sympa" => + (( "check-local" => "disable", + "bin-path" => "/usr/libexec/sympa/sympa_soap_server-wrapper.fcgi", + "socket" => "/var/run/lighttpd/sympa.sock", + "max-procs" => 2, + "idle-timeout" => 20, + )) + ) +} diff --git a/net-mail/sympa/files/sympa-nginx.conf b/net-mail/sympa/files/sympa-nginx.conf new file mode 100644 index 0000000..9b8e1ab --- /dev/null +++ b/net-mail/sympa/files/sympa-nginx.conf @@ -0,0 +1,9 @@ +location /sympa { + fastcgi_split_path_info ^(/sympa)(.*); + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_pass unix:/var/run/sympa.sock; + include fastcgi_params; +} +location /static-sympa { + alias /var/spool/sympa/static_content; +} diff --git a/net-mail/sympa/sympa-5.4.7.ebuild b/net-mail/sympa/sympa-5.4.7.ebuild new file mode 100644 index 0000000..cc0d8a4 --- /dev/null +++ b/net-mail/sympa/sympa-5.4.7.ebuild @@ -0,0 +1,251 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils depend.apache multilib autotools versionator + +SYMPA_VERSION="$(get_version_component_range 1-2)" +SYMPA_RELEASE="$(get_version_component_range 3-)" + +if [[ ${SYMPA_VERSION} == "9999" ]] ; then + # Development version + ESVN_REPO_URI="http://svn.cru.fr/sympa/trunk" + inherit subversion +elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + # Latest stable + ESVN_REPO_URI="http://svn.cru.fr/sympa/branches/sympa-${SYMPA_VERSION}-branch" + inherit subversion +else + # Release + SRC_URI="http://www.sympa.org/distribution/${P}.tar.gz http://www.sympa.org/distribution/old/${P}.tar.gz" +fi + +DESCRIPTION="A feature-rich open source mailing list software" +HOMEPAGE="http://www.sympa.org/features.html" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~amd64" +IUSE="mysql postgres sqlite sqlite3 apache2 clamav fastcgi ldap nfs soap ssl" + +# See http://www.sympa.org/manual/installing-sympa#required_cpan_modules +RDEPEND=" + >=dev-lang/perl-5.8 + ${DEPEND_APACHE} + >=virtual/perl-CGI-3.35 + >=virtual/perl-DB_File-1.75 + >=virtual/perl-Digest-MD5-2.00 + >=virtual/perl-File-Spec-0.8 + >=virtual/perl-MIME-Base64-3.03 + virtual/perl-libnet + >=dev-perl/Archive-Zip-1.05 + >=dev-perl/Crypt-CipherSaber-0.90 + >=dev-perl/DBI-1.48 + >=dev-perl/HTML-StripScripts-Parser-1.0 + dev-perl/IO-stringy + >=dev-perl/MIME-Charset-0.04.1 + >=dev-perl/MIME-EncWords-0.040 + >=dev-perl/MIME-tools-5.423 + >=dev-perl/MailTools-1.51 + dev-perl/Template-Toolkit + dev-perl/XML-LibXML + dev-perl/libintl-perl + dev-perl/libwww-perl + dev-perl/regexp-common + clamav? ( app-antivirus/clamav ) + fastcgi? ( >=dev-perl/FCGI-0.67 ) + ldap? ( >=dev-perl/perl-ldap-0.27 ) + mysql? ( >=dev-perl/DBD-mysql-2.0407 ) + >=net-mail/mhonarc-2.6.0 + nfs? ( dev-perl/File-NFSLock ) + postgres? ( >=dev-perl/DBD-Pg-0.90 ) + soap? ( >=dev-perl/SOAP-Lite-0.60 ) + sqlite? ( dev-perl/DBD-SQLite2 ) + sqlite3? ( dev-perl/DBD-SQLite ) + ssl? ( dev-perl/IO-Socket-SSL + dev-libs/openssl ) + virtual/mta + " +DEPEND="${RDEPEND} + sys-devel/gettext + " + +SYMPA_USER="sympa" +SYMPA_GROUP="sympa" + +# TODO +# apache2 conf ?? +# DBD-Oracle ?? +# DBD-Sybase ?? + +pkg_setup() { + if ! ( useq mysql || useq postgres || useq sqlite || useq sqlite3 ); then + eerror + eerror "You have not specified any supported database backend in your USE flags" + eerror "Supported database backends:" + eerror "mysql, postgres, sqlite & sqlite3" + eerror + die "No database backend specified" + fi + enewgroup ${SYMPA_GROUP} + enewuser ${SYMPA_USER} -1 -1 -1 ${SYMPA_GROUP} +} + +src_unpack() { + if [[ ${SYMPA_VERSION} == "9999" ]] ; then + subversion_src_unpack + elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + subversion_src_unpack + else + unpack ${A} + fi + cd ${S} + # Gentoo specific + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.gentoo_default_config.patch + # Ignore interactive scripts / Enable custom CFLAGS + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.Makefile.am.patch + # Fix locale during initial startup + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.locale.patch + # Fix moderation lefovers + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.moderation.patch + eautoreconf +} + +src_compile() { + local myconf="" + + # No effect + # useq ssl && myconf="${myconf} --with-openssl=/usr/bin/openssl" + + econf \ + --prefix=/usr \ + --with-sbindir=/usr/sbin \ + --with-spooldir=/var/spool/sympa \ + --with-confdir=/etc/sympa \ + --with-etcdir=/etc/sympa \ + --with-cgidir=/usr/libexec/sympa \ + --with-datadir=/usr/share/sympa \ + --with-expldir=/var/lib/sympa/lists \ + --with-libdir=/usr/$(get_libdir)/sympa \ + --with-scriptdir=/usr/share/sympa/scripts \ + --with-initdir=/usr/share/sympa/scripts \ + --with-sampledir=/usr/share/doc/${P}/example \ + --with-piddir=/var/run/sympa \ + --with-mandir=/usr/share/man \ + --with-docdir=/usr/share/doc/${P} \ + --with-localedir=/usr/share/locale \ + ${myconf} \ + || die "econf failed" + emake CFLAGS="${CFLAGS} -Wl,-z,now" || die "emake failed." +} + +src_install() { + + # Pre-copy existing configs so they can be updated by Sympa install procedure + insinto /etc/sympa + [[ -f "/etc/sympa/sympa.conf" ]] && doins /etc/sympa/sympa.conf + [[ -f "/etc/sympa/wwsympa.conf" ]] && doins /etc/sympa/wwsympa.conf + emake DESTDIR="${D}" install || die "emake install failed" + + # Set permissions and ownership on config dir + fowners -R root:${SYMPA_GROUP} /etc/sympa + fperms -R u=rwX,g=rX,o= /etc/sympa + # Elevate some permissions to read config files + fperms g+s /usr/bin/{bouncequeue,familyqueue,queue} + + # Docs + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README + + # Startup script + newinitd ${FILESDIR}/${PN}-${SYMPA_VERSION}.initd ${PN} + + # Create pidfile dir + keepdir /var/run/sympa + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/run/sympa + + # Set proper fastcgi flag + if useq fastcgi; then + sed -i -r "s:^(\s*use_fast_cgi\s*).*:\11:" ${D}/etc/sympa/wwsympa.conf + else + sed -i -r "s:^(\s*use_fast_cgi\s*).*:\10:" ${D}/etc/sympa/wwsympa.conf + fi + # Update antivirus config + if useq clamav; then + sed -i -r \ + -e 's:^#?\s*antivirus_path\s*/.*:antivirus_path /usr/bin/clamscan:' \ + -e 's:^#?\s*antivirus_args\s*.*:antivirus_args --stdout:' \ + ${D}/etc/sympa/sympa.conf + else + sed -i -r \ + -e 's:^(\s*antivirus_path\s*/.*):#\1:' \ + -e 's:^(\s*antivirus_args\s*.*):#\1:' \ + ${D}/etc/sympa/sympa.conf + fi + # Update openssl config + if useq ssl; then + sed -i -r \ + -e 's:^#?\s*openssl\s*/.*:openssl /usr/bin/openssl:' \ + -e 's:^#?\s*capath\s*/.*:capath /etc/ssl/certs:' \ + -e 's:^#?\s*cafile\s*/.*:cafile /etc/ssl/certs/ca-certificates.crt:' \ + ${D}/etc/sympa/sympa.conf + else + sed -i -r \ + -e 's:^(\s*openssl\s*/.*):#\1:' \ + -e 's:^(\s*capath\s*/.*):#\1:' \ + -e 's:^(\s*cafile\s*/.*):#\1:' \ + ${D}/etc/sympa/sympa.conf + fi + # Queue dirs + keepdir /var/spool/sympa + local SYMPA_DIRS="arc auth automatic bounce digest distribute expire \ + moderation msg outgoing qbounce static_content subscribe task tmp topic" + local DIR + for DIR in ${SYMPA_DIRS}; do + keepdir /var/spool/sympa/${DIR} + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/spool/sympa/${DIR} + case "${DIR}" in + "static_content" ) + fperms 755 /var/spool/sympa/${DIR} + ;; + * ) + fperms 750 /var/spool/sympa/${DIR} + ;; + esac + done + keepdir /var/lib/sympa + keepdir /var/lib/sympa/lists + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/lib/sympa/lists + + newdoc ${FILESDIR}/${PN}-apache.conf apache.conf || \ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-apache_soap.conf apache_soap.conf || \ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-lighttpd.conf lighttpd.conf ||\ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-lighttpd_soap.conf lighttpd_soap.conf ||\ + die "newdoc failed" +} + +pkg_postinst() { + elog + elog "You need to create a database with associated database account" + elog "prior to use Sympa. That account will need general" + elog "access privileges to the Sympa database." + elog + elog "The Sympa web interface needs to be setup in your webserver." + elog "For more information please consult Sympa documentation at" + elog "http://www.sympa.org/manual/web-interface#web_server_setup" + elog "Sample configs are installed in /usr/share/doc/${P}" + elog + + if useq clamav; then + elog "By default we use clamscan antivirus scanner" + elog "(antivirus_path option in sympa.conf). For performance" + elog "reason you might want to use clamdscan which is much faster." + elog "To use it you need to do the following:" + elog + elog "# gpasswd -a clamav sympa" + elog "# /etc/init.d/clamd restart" + elog + fi +} diff --git a/net-mail/sympa/sympa-5.4.9999.ebuild b/net-mail/sympa/sympa-5.4.9999.ebuild new file mode 100644 index 0000000..cc22303 --- /dev/null +++ b/net-mail/sympa/sympa-5.4.9999.ebuild @@ -0,0 +1,251 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils depend.apache multilib autotools versionator + +SYMPA_VERSION="$(get_version_component_range 1-2)" +SYMPA_RELEASE="$(get_version_component_range 3-)" + +if [[ ${SYMPA_VERSION} == "9999" ]] ; then + # Development version + ESVN_REPO_URI="http://svn.cru.fr/sympa/trunk" + inherit subversion +elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + # Latest stable + ESVN_REPO_URI="http://svn.cru.fr/sympa/branches/sympa-${SYMPA_VERSION}-branch" + inherit subversion +else + # Release + SRC_URI="http://www.sympa.org/distribution/${P}.tar.gz http://www.sympa.org/distribution/old/${P}.tar.gz" +fi + +DESCRIPTION="A feature-rich open source mailing list software" +HOMEPAGE="http://www.sympa.org/features.html" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="" +IUSE="mysql postgres sqlite sqlite3 apache2 clamav fastcgi ldap nfs soap ssl" + +# See http://www.sympa.org/manual/installing-sympa#required_cpan_modules +RDEPEND=" + >=dev-lang/perl-5.8 + ${DEPEND_APACHE} + >=virtual/perl-CGI-3.35 + >=virtual/perl-DB_File-1.75 + >=virtual/perl-Digest-MD5-2.00 + >=virtual/perl-File-Spec-0.8 + >=virtual/perl-MIME-Base64-3.03 + virtual/perl-libnet + >=dev-perl/Archive-Zip-1.05 + >=dev-perl/Crypt-CipherSaber-0.90 + >=dev-perl/DBI-1.48 + >=dev-perl/HTML-StripScripts-Parser-1.0 + dev-perl/IO-stringy + >=dev-perl/MIME-Charset-0.04.1 + >=dev-perl/MIME-EncWords-0.040 + >=dev-perl/MIME-tools-5.423 + >=dev-perl/MailTools-1.51 + dev-perl/Template-Toolkit + dev-perl/XML-LibXML + dev-perl/libintl-perl + dev-perl/libwww-perl + dev-perl/regexp-common + clamav? ( app-antivirus/clamav ) + fastcgi? ( >=dev-perl/FCGI-0.67 ) + ldap? ( >=dev-perl/perl-ldap-0.27 ) + mysql? ( >=dev-perl/DBD-mysql-2.0407 ) + >=net-mail/mhonarc-2.6.0 + nfs? ( dev-perl/File-NFSLock ) + postgres? ( >=dev-perl/DBD-Pg-0.90 ) + soap? ( >=dev-perl/SOAP-Lite-0.60 ) + sqlite? ( dev-perl/DBD-SQLite2 ) + sqlite3? ( dev-perl/DBD-SQLite ) + ssl? ( dev-perl/IO-Socket-SSL + dev-libs/openssl ) + virtual/mta + " +DEPEND="${RDEPEND} + sys-devel/gettext + " + +SYMPA_USER="sympa" +SYMPA_GROUP="sympa" + +# TODO +# apache2 conf ?? +# DBD-Oracle ?? +# DBD-Sybase ?? + +pkg_setup() { + if ! ( useq mysql || useq postgres || useq sqlite || useq sqlite3 ); then + eerror + eerror "You have not specified any supported database backend in your USE flags" + eerror "Supported database backends:" + eerror "mysql, postgres, sqlite & sqlite3" + eerror + die "No database backend specified" + fi + enewgroup ${SYMPA_GROUP} + enewuser ${SYMPA_USER} -1 -1 -1 ${SYMPA_GROUP} +} + +src_unpack() { + if [[ ${SYMPA_VERSION} == "9999" ]] ; then + subversion_src_unpack + elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + subversion_src_unpack + else + unpack ${A} + fi + cd ${S} + # Gentoo specific + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.gentoo_default_config.patch + # Ignore interactive scripts / Enable custom CFLAGS + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.Makefile.am.patch + # Fix locale during initial startup + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.locale.patch + # Fix moderation lefovers + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.moderation.patch + eautoreconf +} + +src_compile() { + local myconf="" + + # No effect + # useq ssl && myconf="${myconf} --with-openssl=/usr/bin/openssl" + + econf \ + --prefix=/usr \ + --with-sbindir=/usr/sbin \ + --with-spooldir=/var/spool/sympa \ + --with-confdir=/etc/sympa \ + --with-etcdir=/etc/sympa \ + --with-cgidir=/usr/libexec/sympa \ + --with-datadir=/usr/share/sympa \ + --with-expldir=/var/lib/sympa/lists \ + --with-libdir=/usr/$(get_libdir)/sympa \ + --with-scriptdir=/usr/share/sympa/scripts \ + --with-initdir=/usr/share/sympa/scripts \ + --with-sampledir=/usr/share/doc/${P}/example \ + --with-piddir=/var/run/sympa \ + --with-mandir=/usr/share/man \ + --with-docdir=/usr/share/doc/${P} \ + --with-localedir=/usr/share/locale \ + ${myconf} \ + || die "econf failed" + emake CFLAGS="${CFLAGS} -Wl,-z,now" || die "emake failed." +} + +src_install() { + + # Pre-copy existing configs so they can be updated by Sympa install procedure + insinto /etc/sympa + [[ -f "/etc/sympa/sympa.conf" ]] && doins /etc/sympa/sympa.conf + [[ -f "/etc/sympa/wwsympa.conf" ]] && doins /etc/sympa/wwsympa.conf + emake DESTDIR="${D}" install || die "emake install failed" + + # Set permissions and ownership on config dir + fowners -R root:${SYMPA_GROUP} /etc/sympa + fperms -R u=rwX,g=rX,o= /etc/sympa + # Elevate some permissions to read config files + fperms g+s /usr/bin/{bouncequeue,familyqueue,queue} + + # Docs + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README + + # Startup script + newinitd ${FILESDIR}/${PN}-${SYMPA_VERSION}.initd ${PN} + + # Create pidfile dir + keepdir /var/run/sympa + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/run/sympa + + # Set proper fastcgi flag + if useq fastcgi; then + sed -i -r "s:^(\s*use_fast_cgi\s*).*:\11:" ${D}/etc/sympa/wwsympa.conf + else + sed -i -r "s:^(\s*use_fast_cgi\s*).*:\10:" ${D}/etc/sympa/wwsympa.conf + fi + # Update antivirus config + if useq clamav; then + sed -i -r \ + -e 's:^#?\s*antivirus_path\s*/.*:antivirus_path /usr/bin/clamscan:' \ + -e 's:^#?\s*antivirus_args\s*.*:antivirus_args --stdout:' \ + ${D}/etc/sympa/sympa.conf + else + sed -i -r \ + -e 's:^(\s*antivirus_path\s*/.*):#\1:' \ + -e 's:^(\s*antivirus_args\s*.*):#\1:' \ + ${D}/etc/sympa/sympa.conf + fi + # Update openssl config + if useq ssl; then + sed -i -r \ + -e 's:^#?\s*openssl\s*/.*:openssl /usr/bin/openssl:' \ + -e 's:^#?\s*capath\s*/.*:capath /etc/ssl/certs:' \ + -e 's:^#?\s*cafile\s*/.*:cafile /etc/ssl/certs/ca-certificates.crt:' \ + ${D}/etc/sympa/sympa.conf + else + sed -i -r \ + -e 's:^(\s*openssl\s*/.*):#\1:' \ + -e 's:^(\s*capath\s*/.*):#\1:' \ + -e 's:^(\s*cafile\s*/.*):#\1:' \ + ${D}/etc/sympa/sympa.conf + fi + # Queue dirs + keepdir /var/spool/sympa + local SYMPA_DIRS="arc auth automatic bounce digest distribute expire \ + moderation msg outgoing qbounce static_content subscribe task tmp topic" + local DIR + for DIR in ${SYMPA_DIRS}; do + keepdir /var/spool/sympa/${DIR} + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/spool/sympa/${DIR} + case "${DIR}" in + "static_content" ) + fperms 755 /var/spool/sympa/${DIR} + ;; + * ) + fperms 750 /var/spool/sympa/${DIR} + ;; + esac + done + keepdir /var/lib/sympa + keepdir /var/lib/sympa/lists + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/lib/sympa/lists + + newdoc ${FILESDIR}/${PN}-apache.conf apache.conf || \ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-apache_soap.conf apache_soap.conf || \ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-lighttpd.conf lighttpd.conf ||\ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-lighttpd_soap.conf lighttpd_soap.conf ||\ + die "newdoc failed" +} + +pkg_postinst() { + elog + elog "You need to create a database with associated database account" + elog "prior to use Sympa. That account will need general" + elog "access privileges to the Sympa database." + elog + elog "The Sympa web interface needs to be setup in your webserver." + elog "For more information please consult Sympa documentation at" + elog "http://www.sympa.org/manual/web-interface#web_server_setup" + elog "Sample configs are installed in /usr/share/doc/${P}" + elog + + if useq clamav; then + elog "By default we use clamscan antivirus scanner" + elog "(antivirus_path option in sympa.conf). For performance" + elog "reason you might want to use clamdscan which is much faster." + elog "To use it you need to do the following:" + elog + elog "# gpasswd -a clamav sympa" + elog "# /etc/init.d/clamd restart" + elog + fi +} diff --git a/net-mail/sympa/sympa-6.0.6.ebuild b/net-mail/sympa/sympa-6.0.6.ebuild new file mode 100644 index 0000000..ddda124 --- /dev/null +++ b/net-mail/sympa/sympa-6.0.6.ebuild @@ -0,0 +1,263 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils depend.apache multilib autotools versionator + +SYMPA_VERSION="$(get_version_component_range 1-2)" +SYMPA_RELEASE="$(get_version_component_range 3-)" + +if [[ ${SYMPA_VERSION} == "9999" ]] ; then + # Development version + ESVN_REPO_URI="http://svn.cru.fr/sympa/trunk" + inherit subversion +elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + # Latest stable + ESVN_REPO_URI="http://svn.cru.fr/sympa/branches/sympa-${SYMPA_VERSION}-branch" + inherit subversion +else + # Release + SRC_URI="http://www.sympa.org/distribution/${P}.tar.gz http://www.sympa.org/distribution/old/${P}.tar.gz" +fi + +DESCRIPTION="A feature-rich open source mailing list software" +HOMEPAGE="http://www.sympa.org/features.html" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~amd64" +IUSE="mysql postgres sqlite sqlite3 apache2 clamav -compat fastcgi ldap nfs nls soap ssl" + +# See http://www.sympa.org/manual/installing-sympa#required_cpan_modules +RDEPEND=" + >=dev-lang/perl-5.8 + ${DEPEND_APACHE} + >=virtual/perl-CGI-3.35 + >=virtual/perl-DB_File-1.75 + >=virtual/perl-Digest-MD5-2.00 + >=virtual/perl-File-Spec-0.8 + >=virtual/perl-MIME-Base64-3.03 + >=virtual/perl-Time-HiRes-1.29 + virtual/perl-libnet + >=dev-perl/Archive-Zip-1.05 + >=dev-perl/DBI-1.48 + >=dev-perl/Email-Date-Format-1.002 + >=dev-perl/File-Copy-Recursive-0.36 + dev-perl/HTML-Format + >=dev-perl/HTML-StripScripts-Parser-1.0 + dev-perl/HTML-Tree + dev-perl/IO-stringy + >=dev-perl/MIME-Charset-0.04.1 + >=dev-perl/MIME-EncWords-0.040 + >=dev-perl/MIME-Lite-3.024 + >=dev-perl/MIME-Lite-HTML-1.23 + >=dev-perl/MIME-tools-5.423 + >=dev-perl/MailTools-1.51 + >=dev-perl/Net-Netmask-1.901.500 + dev-perl/Template-Toolkit + >=dev-perl/Term-ProgressBar-2.09 + dev-perl/XML-LibXML + dev-perl/libintl-perl + dev-perl/libwww-perl + dev-perl/regexp-common + >=net-mail/mhonarc-2.6.0 + clamav? ( app-antivirus/clamav ) + compat? ( >=dev-perl/Crypt-CipherSaber-0.50 ) + fastcgi? ( >=dev-perl/FCGI-0.67 ) + ldap? ( >=dev-perl/perl-ldap-0.27 ) + mysql? ( >=dev-perl/DBD-mysql-2.0407 ) + nfs? ( dev-perl/File-NFSLock ) + postgres? ( >=dev-perl/DBD-Pg-0.90 ) + soap? ( >=dev-perl/SOAP-Lite-0.60 ) + sqlite? ( dev-perl/DBD-SQLite2 ) + sqlite3? ( dev-perl/DBD-SQLite ) + ssl? ( >=dev-perl/IO-Socket-SSL-0.90 + >=dev-perl/Net-SSLeay-1.16 + dev-libs/openssl ) + virtual/mta + " +DEPEND="${RDEPEND} + sys-devel/gettext + " + +SYMPA_USER="sympa" +SYMPA_GROUP="sympa" + +pkg_setup() { + if ! ( useq mysql || useq postgres || useq sqlite || useq sqlite3 ); then + eerror + eerror "You have not specified any supported database backend in your USE flags" + eerror "Supported database backends:" + eerror "mysql, postgres, sqlite & sqlite3" + eerror + die "No database backend specified" + fi + enewgroup ${SYMPA_GROUP} + enewuser ${SYMPA_USER} -1 -1 -1 ${SYMPA_GROUP} +} + +src_unpack() { + if [[ ${SYMPA_VERSION} == "9999" ]] ; then + subversion_src_unpack + elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + subversion_src_unpack + else + unpack ${A} + cd ${S} + fi + cd ${S} + # Override defaults for certain options + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.fix.defaults.patch + # Gentoo specific: redefine some defaults + sed -i -e 's|^\(\s*staticdir=\).*|\1/var/spool/sympa/static_content|' \ + -e 's|^\(\s*bouncedir=\).*|\1/var/spool/sympa/bounce|' \ + -e 's|^\(\s*arcdir=\).*|\1/var/spool/sympa/arc|' \ + configure.ac + eautoreconf +} + +src_compile() { + econf \ + --prefix=/usr \ + --libdir=/usr/$(get_libdir)/sympa \ + --libexec=/usr/libexec/sympa \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${P} \ + --with-localedir=/usr/share/locale \ + --sysconfdir=/etc/sympa \ + --with-confdir=/etc/sympa \ + --with-piddir=/var/run/sympa \ + --with-spooldir=/var/spool/sympa \ + --with-modulesdir=/usr/$(get_libdir)/sympa \ + --with-cgidir=/usr/libexec/sympa \ + --with-expldir=/var/lib/sympa/lists \ + --with-scriptdir=/usr/share/sympa/scripts \ + --with-initdir=/usr/share/sympa/scripts \ + --with-defaultdir=/usr/share/sympa/default \ + --with-user=${SYMPA_USER} \ + --with-group=${SYMPA_GROUP} \ + --enable-fhs \ + $(use_enable nls) \ + || die "econf failed" + emake CFLAGS="${CFLAGS} -Wl,-z,now" || die "emake failed." +} + +src_install() { + + emake DESTDIR="${D}" install || die "emake install failed" + + # Set permissions and ownership on config dir + fowners -R root:${SYMPA_GROUP} /etc/sympa + fperms -R u=rwX,g=rX,o= /etc/sympa + # Elevate some permissions to read config files + fperms g+s /usr/libexec/sympa/{bouncequeue,familyqueue,queue} + + # Docs + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README README.charset + + # Startup script + newinitd ${FILESDIR}/${PN}-${SYMPA_VERSION}.initd ${PN} + + # Create pidfile dir + keepdir /var/run/sympa + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/run/sympa + + # Set proper fastcgi flag + if useq fastcgi; then + sed -i -r "s:^(\s*use_fast_cgi\s*).*:\11:" ${D}/etc/sympa/wwsympa.conf + else + sed -i -r "s:^(\s*use_fast_cgi\s*).*:\10:" ${D}/etc/sympa/wwsympa.conf + fi + # Update antivirus config + if useq clamav; then + sed -i -r \ + -e 's:^#?\s*antivirus_path\s*/.*:antivirus_path /usr/bin/clamscan:' \ + -e 's:^#?\s*antivirus_args\s*.*:antivirus_args --stdout:' \ + ${D}/etc/sympa/sympa.conf + else + sed -i -r \ + -e 's:^(\s*antivirus_path\s*/.*):#\1:' \ + -e 's:^(\s*antivirus_args\s*.*):#\1:' \ + ${D}/etc/sympa/sympa.conf + fi + # Update openssl config + if useq ssl; then + sed -i -r \ + -e 's:^#?\s*openssl\s*/.*:openssl /usr/bin/openssl:' \ + -e 's:^#?\s*capath\s*/.*:capath /etc/ssl/certs:' \ + -e 's:^#?\s*cafile\s*/.*:cafile /etc/ssl/certs/ca-certificates.crt:' \ + ${D}/etc/sympa/sympa.conf + else + sed -i -r \ + -e 's:^(\s*openssl\s*/.*):#\1:' \ + -e 's:^(\s*capath\s*/.*):#\1:' \ + -e 's:^(\s*cafile\s*/.*):#\1:' \ + ${D}/etc/sympa/sympa.conf + fi + # Queue dirs + keepdir /var/spool/sympa + local SYMPA_DIRS="arc auth automatic bounce digest distribute expire \ + moderation msg outgoing qbounce static_content subscribe task tmp topic" + local DIR + for DIR in ${SYMPA_DIRS}; do + keepdir /var/spool/sympa/${DIR} + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/spool/sympa/${DIR} + case "${DIR}" in + "static_content" ) + fperms 755 /var/spool/sympa/${DIR} + ;; + * ) + fperms 750 /var/spool/sympa/${DIR} + ;; + esac + done + keepdir /var/lib/sympa + keepdir /var/lib/sympa/lists + + newdoc ${FILESDIR}/${PN}-apache.conf apache.conf || \ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-apache_soap.conf apache_soap.conf || \ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-lighttpd.conf lighttpd.conf ||\ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-lighttpd_soap.conf lighttpd_soap.conf ||\ + die "newdoc failed" +} + +pkg_postinst() { + elog + elog "You need to create a database with associated database account" + elog "prior to use Sympa. That account will need general" + elog "access privileges to the Sympa database." + elog + elog "The Sympa web interface needs to be setup in your webserver." + elog "For more information please consult Sympa documentation at" + elog "http://www.sympa.org/manual/web-interface#web_server_setup" + elog "Sample configs are installed in /usr/share/doc/${P}" + elog + + if useq clamav; then + elog "By default we use clamscan antivirus scanner" + elog "(antivirus_path option in sympa.conf). For performance" + elog "reason you might want to use clamdscan which is much faster." + elog "To use it you need to do the following:" + elog + elog "# gpasswd -a clamav sympa" + elog "# /etc/init.d/clamd restart" + elog + fi + + ewarn "If you are upgrading from version < ${SYMPA_VERSION} make sure" + ewarn "compat use flag is set while emerging. Pleae run:" + ewarn + ewarn "# sympa.pl --upgrade" + ewarn + ewarn "to upgrade your data structures and" + ewarn + ewarn "# sympa.pl --md5_encode_password" + ewarn + ewarn "to convert your passwords. When completed compat use flag" + ewarn "can be removed" +} diff --git a/net-mail/sympa/sympa-6.0.9999.ebuild b/net-mail/sympa/sympa-6.0.9999.ebuild new file mode 100644 index 0000000..ca9d404 --- /dev/null +++ b/net-mail/sympa/sympa-6.0.9999.ebuild @@ -0,0 +1,263 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils depend.apache multilib autotools versionator + +SYMPA_VERSION="$(get_version_component_range 1-2)" +SYMPA_RELEASE="$(get_version_component_range 3-)" + +if [[ ${SYMPA_VERSION} == "9999" ]] ; then + # Development version + ESVN_REPO_URI="http://svn.cru.fr/sympa/trunk" + inherit subversion +elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + # Latest stable + ESVN_REPO_URI="http://svn.cru.fr/sympa/branches/sympa-${SYMPA_VERSION}-branch" + inherit subversion +else + # Release + SRC_URI="http://www.sympa.org/distribution/${P}.tar.gz http://www.sympa.org/distribution/old/${P}.tar.gz" +fi + +DESCRIPTION="A feature-rich open source mailing list software" +HOMEPAGE="http://www.sympa.org/features.html" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="" +IUSE="mysql postgres sqlite sqlite3 apache2 clamav -compat fastcgi ldap nfs nls soap ssl" + +# See http://www.sympa.org/manual/installing-sympa#required_cpan_modules +RDEPEND=" + >=dev-lang/perl-5.8 + ${DEPEND_APACHE} + >=virtual/perl-CGI-3.35 + >=virtual/perl-DB_File-1.75 + >=virtual/perl-Digest-MD5-2.00 + >=virtual/perl-File-Spec-0.8 + >=virtual/perl-MIME-Base64-3.03 + >=virtual/perl-Time-HiRes-1.29 + virtual/perl-libnet + >=dev-perl/Archive-Zip-1.05 + >=dev-perl/DBI-1.48 + >=dev-perl/Email-Date-Format-1.002 + >=dev-perl/File-Copy-Recursive-0.36 + dev-perl/HTML-Format + >=dev-perl/HTML-StripScripts-Parser-1.0 + dev-perl/HTML-Tree + dev-perl/IO-stringy + >=dev-perl/MIME-Charset-0.04.1 + >=dev-perl/MIME-EncWords-0.040 + >=dev-perl/MIME-Lite-3.024 + >=dev-perl/MIME-Lite-HTML-1.23 + >=dev-perl/MIME-tools-5.423 + >=dev-perl/MailTools-1.51 + >=dev-perl/Net-Netmask-1.901.500 + dev-perl/Template-Toolkit + >=dev-perl/Term-ProgressBar-2.09 + dev-perl/XML-LibXML + dev-perl/libintl-perl + dev-perl/libwww-perl + dev-perl/regexp-common + >=net-mail/mhonarc-2.6.0 + clamav? ( app-antivirus/clamav ) + compat? ( >=dev-perl/Crypt-CipherSaber-0.50 ) + fastcgi? ( >=dev-perl/FCGI-0.67 ) + ldap? ( >=dev-perl/perl-ldap-0.27 ) + mysql? ( >=dev-perl/DBD-mysql-2.0407 ) + nfs? ( dev-perl/File-NFSLock ) + postgres? ( >=dev-perl/DBD-Pg-0.90 ) + soap? ( >=dev-perl/SOAP-Lite-0.60 ) + sqlite? ( dev-perl/DBD-SQLite2 ) + sqlite3? ( dev-perl/DBD-SQLite ) + ssl? ( >=dev-perl/IO-Socket-SSL-0.90 + >=dev-perl/Net-SSLeay-1.16 + dev-libs/openssl ) + virtual/mta + " +DEPEND="${RDEPEND} + sys-devel/gettext + " + +SYMPA_USER="sympa" +SYMPA_GROUP="sympa" + +pkg_setup() { + if ! ( useq mysql || useq postgres || useq sqlite || useq sqlite3 ); then + eerror + eerror "You have not specified any supported database backend in your USE flags" + eerror "Supported database backends:" + eerror "mysql, postgres, sqlite & sqlite3" + eerror + die "No database backend specified" + fi + enewgroup ${SYMPA_GROUP} + enewuser ${SYMPA_USER} -1 -1 -1 ${SYMPA_GROUP} +} + +src_unpack() { + if [[ ${SYMPA_VERSION} == "9999" ]] ; then + subversion_src_unpack + elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + subversion_src_unpack + else + unpack ${A} + cd ${S} + fi + cd ${S} + # Override defaults for certain options + epatch ${FILESDIR}/${PN}-${SYMPA_VERSION}.fix.defaults.patch + # Gentoo specific: redefine some defaults + sed -i -e 's|^\(\s*staticdir=\).*|\1/var/spool/sympa/static_content|' \ + -e 's|^\(\s*bouncedir=\).*|\1/var/spool/sympa/bounce|' \ + -e 's|^\(\s*arcdir=\).*|\1/var/spool/sympa/arc|' \ + configure.ac + eautoreconf +} + +src_compile() { + econf \ + --prefix=/usr \ + --libdir=/usr/$(get_libdir)/sympa \ + --libexec=/usr/libexec/sympa \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${P} \ + --with-localedir=/usr/share/locale \ + --sysconfdir=/etc/sympa \ + --with-confdir=/etc/sympa \ + --with-piddir=/var/run/sympa \ + --with-spooldir=/var/spool/sympa \ + --with-modulesdir=/usr/$(get_libdir)/sympa \ + --with-cgidir=/usr/libexec/sympa \ + --with-expldir=/var/lib/sympa/lists \ + --with-scriptdir=/usr/share/sympa/scripts \ + --with-initdir=/usr/share/sympa/scripts \ + --with-defaultdir=/usr/share/sympa/default \ + --with-user=${SYMPA_USER} \ + --with-group=${SYMPA_GROUP} \ + --enable-fhs \ + $(use_enable nls) \ + || die "econf failed" + emake CFLAGS="${CFLAGS} -Wl,-z,now" || die "emake failed." +} + +src_install() { + + emake DESTDIR="${D}" install || die "emake install failed" + + # Set permissions and ownership on config dir + fowners -R root:${SYMPA_GROUP} /etc/sympa + fperms -R u=rwX,g=rX,o= /etc/sympa + # Elevate some permissions to read config files + fperms g+s /usr/libexec/sympa/{bouncequeue,familyqueue,queue} + + # Docs + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README README.charset + + # Startup script + newinitd ${FILESDIR}/${PN}-${SYMPA_VERSION}.initd ${PN} + + # Create pidfile dir + keepdir /var/run/sympa + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/run/sympa + + # Set proper fastcgi flag + if useq fastcgi; then + sed -i -r "s:^(\s*use_fast_cgi\s*).*:\11:" ${D}/etc/sympa/wwsympa.conf + else + sed -i -r "s:^(\s*use_fast_cgi\s*).*:\10:" ${D}/etc/sympa/wwsympa.conf + fi + # Update antivirus config + if useq clamav; then + sed -i -r \ + -e 's:^#?\s*antivirus_path\s*/.*:antivirus_path /usr/bin/clamscan:' \ + -e 's:^#?\s*antivirus_args\s*.*:antivirus_args --stdout:' \ + ${D}/etc/sympa/sympa.conf + else + sed -i -r \ + -e 's:^(\s*antivirus_path\s*/.*):#\1:' \ + -e 's:^(\s*antivirus_args\s*.*):#\1:' \ + ${D}/etc/sympa/sympa.conf + fi + # Update openssl config + if useq ssl; then + sed -i -r \ + -e 's:^#?\s*openssl\s*/.*:openssl /usr/bin/openssl:' \ + -e 's:^#?\s*capath\s*/.*:capath /etc/ssl/certs:' \ + -e 's:^#?\s*cafile\s*/.*:cafile /etc/ssl/certs/ca-certificates.crt:' \ + ${D}/etc/sympa/sympa.conf + else + sed -i -r \ + -e 's:^(\s*openssl\s*/.*):#\1:' \ + -e 's:^(\s*capath\s*/.*):#\1:' \ + -e 's:^(\s*cafile\s*/.*):#\1:' \ + ${D}/etc/sympa/sympa.conf + fi + # Queue dirs + keepdir /var/spool/sympa + local SYMPA_DIRS="arc auth automatic bounce digest distribute expire \ + moderation msg outgoing qbounce static_content subscribe task tmp topic" + local DIR + for DIR in ${SYMPA_DIRS}; do + keepdir /var/spool/sympa/${DIR} + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/spool/sympa/${DIR} + case "${DIR}" in + "static_content" ) + fperms 755 /var/spool/sympa/${DIR} + ;; + * ) + fperms 750 /var/spool/sympa/${DIR} + ;; + esac + done + keepdir /var/lib/sympa + keepdir /var/lib/sympa/lists + + newdoc ${FILESDIR}/${PN}-apache.conf apache.conf || \ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-apache_soap.conf apache_soap.conf || \ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-lighttpd.conf lighttpd.conf ||\ + die "newdoc failed" + newdoc ${FILESDIR}/${PN}-lighttpd_soap.conf lighttpd_soap.conf ||\ + die "newdoc failed" +} + +pkg_postinst() { + elog + elog "You need to create a database with associated database account" + elog "prior to use Sympa. That account will need general" + elog "access privileges to the Sympa database." + elog + elog "The Sympa web interface needs to be setup in your webserver." + elog "For more information please consult Sympa documentation at" + elog "http://www.sympa.org/manual/web-interface#web_server_setup" + elog "Sample configs are installed in /usr/share/doc/${P}" + elog + + if useq clamav; then + elog "By default we use clamscan antivirus scanner" + elog "(antivirus_path option in sympa.conf). For performance" + elog "reason you might want to use clamdscan which is much faster." + elog "To use it you need to do the following:" + elog + elog "# gpasswd -a clamav sympa" + elog "# /etc/init.d/clamd restart" + elog + fi + + ewarn "If you are upgrading from version < ${SYMPA_VERSION} make sure" + ewarn "compat use flag is set while emerging. Pleae run:" + ewarn + ewarn "# sympa.pl --upgrade" + ewarn + ewarn "to upgrade your data structures and" + ewarn + ewarn "# sympa.pl --md5_encode_password" + ewarn + ewarn "to convert your passwords. When completed compat use flag" + ewarn "can be removed" +} diff --git a/net-mail/sympa/sympa-6.1.20.ebuild b/net-mail/sympa/sympa-6.1.20.ebuild new file mode 100644 index 0000000..5681999 --- /dev/null +++ b/net-mail/sympa/sympa-6.1.20.ebuild @@ -0,0 +1,265 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="5" + +inherit eutils user depend.apache multilib autotools versionator + +SYMPA_VERSION="$(get_version_component_range 1-2)" +SYMPA_RELEASE="$(get_version_component_range 3-)" + +if [[ ${SYMPA_VERSION} == "9999" ]] ; then + # Development version + ESVN_REPO_URI="http://svn.cru.fr/sympa/trunk" + inherit subversion +elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + # Latest stable + ESVN_REPO_URI="http://svn.cru.fr/sympa/branches/sympa-${SYMPA_VERSION}-branch" + inherit subversion +else + # Release + SRC_URI="http://www.sympa.org/distribution/${P}.tar.gz http://www.sympa.org/distribution/old/${P}.tar.gz" +fi + +DESCRIPTION="A feature-rich open source mailing list software" +HOMEPAGE="http://www.sympa.org/features.html" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~x86 ~amd64" +IUSE="apache2 clamav -compat dkim fastcgi ldap mysql nfs nls postgres soap sqlite ssl" +REQUIRED_USE="|| ( mysql postgres sqlite )" + +# See http://www.sympa.org/manual/installing-sympa#required_cpan_modules +RDEPEND=" + ${DEPEND_APACHE} + >=dev-lang/perl-5.8 + >=virtual/perl-CGI-3.35 + >=virtual/perl-DB_File-1.75 + >=virtual/perl-Digest-MD5-2.00 + virtual/perl-Encode + >=virtual/perl-MIME-Base64-3.03 + >=virtual/perl-Time-HiRes-1.29 + virtual/perl-libnet + >=dev-perl/Archive-Zip-1.05 + >=dev-perl/DBI-1.48 + >=dev-perl/File-Copy-Recursive-0.36 + dev-perl/HTML-Format + >=dev-perl/HTML-StripScripts-Parser-1.03 + dev-perl/HTML-Tree + dev-perl/IO-stringy + >=dev-perl/MIME-Charset-1.006.2 + >=dev-perl/MIME-EncWords-1.010 + >=dev-perl/MIME-Lite-HTML-1.23 + >=dev-perl/MIME-tools-5.423 + >=dev-perl/Net-Netmask-1.901.500 + dev-perl/Template-Toolkit + >=dev-perl/Term-ProgressBar-2.09 + >=dev-perl/Unicode-LineBreak-2011.05 + >=dev-perl/URI-1.35 + dev-perl/XML-LibXML + dev-perl/libintl-perl + dev-perl/libwww-perl + >=net-mail/mhonarc-2.6.0 + clamav? ( app-antivirus/clamav ) + compat? ( >=dev-perl/Crypt-CipherSaber-0.50 ) + dkim? ( >=dev-perl/Mail-DKIM-0.36 ) + fastcgi? ( >=dev-perl/FCGI-0.67 ) + ldap? ( >=dev-perl/perl-ldap-0.27 ) + mysql? ( >=dev-perl/DBD-mysql-4.008 ) + nfs? ( dev-perl/File-NFSLock ) + postgres? ( >=dev-perl/DBD-Pg-0.90 ) + soap? ( >=dev-perl/SOAP-Lite-0.712 ) + sqlite? ( >=dev-perl/DBD-SQLite-0.90 ) + ssl? ( >=dev-perl/IO-Socket-SSL-0.90 + dev-libs/openssl ) + virtual/mta + " +DEPEND="${RDEPEND} + sys-devel/gettext + " + +SYMPA_USER="sympa" +SYMPA_GROUP="sympa" + +pkg_setup() { + enewgroup ${SYMPA_GROUP} + enewuser ${SYMPA_USER} -1 -1 -1 ${SYMPA_GROUP} +} + +src_unpack() { + if [[ ${SYMPA_VERSION} == "9999" ]] ; then + subversion_src_unpack + elif [[ ${SYMPA_RELEASE} == "9999" ]] ; then + subversion_src_unpack + else + unpack ${A} + cd ${S} + fi + cd ${S} + # Override defaults for certain options, so + # Sympa won't complain about conflicting paths + sed -i -e "/'queuebounce'/,/}/ s|'/bounce'|'/qbounce'|" src/lib/confdef.pm + # Gentoo specific: redefine some defaults + sed -i -e 's|^\(\s*staticdir=\).*|\1/var/spool/sympa/static_content|' \ + -e 's|^\(\s*bouncedir=\).*|\1/var/spool/sympa/bounce|' \ + -e 's|^\(\s*arcdir=\).*|\1/var/spool/sympa/arc|' \ + configure.ac + eautoreconf +} + +src_configure() { + econf \ + --prefix=/usr \ + --libdir=/usr/$(get_libdir)/sympa \ + --libexec=/usr/libexec/sympa \ + --localstatedir=/var \ + --docdir=/usr/share/doc/${P} \ + --with-localedir=/usr/share/locale \ + --sysconfdir=/etc/sympa \ + --with-confdir=/etc/sympa \ + --with-piddir=/var/run/sympa \ + --with-spooldir=/var/spool/sympa \ + --with-modulesdir=/usr/$(get_libdir)/sympa \ + --with-cgidir=/usr/libexec/sympa \ + --with-expldir=/var/lib/sympa/lists \ + --with-scriptdir=/usr/share/sympa/scripts \ + --with-initdir=/usr/share/sympa/scripts \ + --with-defaultdir=/usr/share/sympa/default \ + --with-user=${SYMPA_USER} \ + --with-group=${SYMPA_GROUP} \ + --enable-fhs \ + $(use_enable nls) \ + || die "econf failed" +} + +src_compile() { + emake CFLAGS="${CFLAGS} -Wl,-z,now" || die "emake failed." +} + +src_install() { + + emake DESTDIR="${D}" install || die "emake install failed" + + # Do not overwrite data_structure.version + rm -f "${D}/etc/sympa/data_structure.version" + # Set permissions and ownership on config files + fowners root:${SYMPA_GROUP} /etc/sympa/sympa.conf /etc/sympa/wwsympa.conf + fperms u=rwX,g=rX,o= /etc/sympa/sympa.conf /etc/sympa/wwsympa.conf + # Elevate some permissions to read config files + fperms g+s /usr/libexec/sympa/{bouncequeue,familyqueue,queue} + + # Docs + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README README.charset + + # Startup script + newinitd "${FILESDIR}/${PN}-${SYMPA_VERSION}.initd" "${PN}" + + # Create pidfile dir + keepdir /var/run/sympa + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/run/sympa + + # Set proper fastcgi flag + if use fastcgi; then + sed -i -r 's:^(\s*use_fast_cgi\s*).*:\11:' "${D}/etc/sympa/wwsympa.conf" + else + sed -i -r 's:^(\s*use_fast_cgi\s*).*:\10:' "${D}/etc/sympa/wwsympa.conf" + fi + # Update antivirus config + if use clamav; then + sed -i -r \ + -e 's:^#?\s*antivirus_path\s*/.*:antivirus_path /usr/bin/clamscan:' \ + -e 's:^#?\s*antivirus_args\s*.*:antivirus_args --stdout:' \ + "${D}/etc/sympa/sympa.conf" + else + sed -i -r \ + -e 's:^(\s*antivirus_path\s*/.*):#\1:' \ + -e 's:^(\s*antivirus_args\s*.*):#\1:' \ + "${D}/etc/sympa/sympa.conf" + fi + # Update openssl config + if use ssl; then + sed -i -r \ + -e 's:^#?\s*openssl\s*/.*:openssl /usr/bin/openssl:' \ + -e 's:^#?\s*capath\s*/.*:capath /etc/ssl/certs:' \ + -e 's:^#?\s*cafile\s*/.*:cafile /etc/ssl/certs/ca-certificates.crt:' \ + "${D}/etc/sympa/sympa.conf" + else + sed -i -r \ + -e 's:^(\s*openssl\s*/.*):#\1:' \ + -e 's:^(\s*capath\s*/.*):#\1:' \ + -e 's:^(\s*cafile\s*/.*):#\1:' \ + "${D}/etc/sympa/sympa.conf" + fi + # Queue dirs + keepdir /var/spool/sympa + local SYMPA_DIRS="arc auth automatic bounce digest distribute expire \ + moderation msg outgoing qbounce static_content subscribe task tmp topic" + local DIR + for DIR in ${SYMPA_DIRS}; do + keepdir /var/spool/sympa/${DIR} + fowners ${SYMPA_USER}:${SYMPA_GROUP} /var/spool/sympa/${DIR} + case "${DIR}" in + "static_content" ) + fperms 755 /var/spool/sympa/${DIR} + ;; + * ) + fperms 750 /var/spool/sympa/${DIR} + ;; + esac + done + keepdir /var/lib/sympa + keepdir /var/lib/sympa/lists + + newdoc "${FILESDIR}/${PN}-apache.conf" apache.conf || \ + die "newdoc failed" + newdoc "${FILESDIR}/${PN}-apache_soap.conf" apache_soap.conf || \ + die "newdoc failed" + newdoc "${FILESDIR}/${PN}-lighttpd.conf" lighttpd.conf ||\ + die "newdoc failed" + newdoc "${FILESDIR}/${PN}-lighttpd_soap.conf" lighttpd_soap.conf ||\ + die "newdoc failed" + newdoc "${FILESDIR}/${PN}-nginx.conf" nginx.conf ||\ + die "newdoc failed" +} + +pkg_postinst() { + elog + elog "You need to create a database with associated database account" + elog "prior to use Sympa. That account will need general" + elog "access privileges to the Sympa database." + elog + elog "The Sympa web interface needs to be setup in your webserver." + elog "For more information please consult Sympa documentation at" + elog "http://www.sympa.org/manual/web-interface#web_server_setup" + elog "Sample configs are installed in /usr/share/doc/${P}" + elog + + if use clamav; then + elog "By default we use clamscan antivirus scanner" + elog "(antivirus_path option in sympa.conf). For performance" + elog "reason you might want to use clamdscan which is much faster." + elog "To use it you need to do the following:" + elog + elog "# gpasswd -a clamav sympa" + elog "# /etc/init.d/clamd restart" + elog + fi + + ewarn "If you are upgrading from an earlier version please run:" + ewarn + ewarn "# sympa.pl --upgrade" + ewarn + ewarn "If you are upgrading from version 5.x make sure" + ewarn "compat use flag is set while emerging, then run:" + ewarn + ewarn "# sympa.pl --upgrade" + ewarn + ewarn "to upgrade your data structures and" + ewarn + ewarn "# sympa.pl --md5_encode_password" + ewarn + ewarn "to convert your passwords. When completed compat use flag" + ewarn "can be removed" +} -- cgit v1.2.3