From 7f21d8214b663988ff89f023ba2b32861aa2e179 Mon Sep 17 00:00:00 2001
From: Ian Leitch <port001@gentoo.org>
Date: Wed, 5 Jan 2005 23:35:42 +0000
Subject: Create missing /var/run/aolserver (fixes init script). Create group
 'aolserver' instead of 'web' and set aolserver user's shell to /bin/false.
 Also provided a pkg_setup() to correct these for users who are upgrading.

---
 www-servers/aolserver/ChangeLog                    |   9 +-
 www-servers/aolserver/Manifest                     |  14 +-
 www-servers/aolserver/aolserver-4.0.9-r1.ebuild    | 245 +++++++++++++++++++++
 .../aolserver/files/digest-aolserver-4.0.9-r1      |   1 +
 4 files changed, 257 insertions(+), 12 deletions(-)
 create mode 100644 www-servers/aolserver/aolserver-4.0.9-r1.ebuild
 create mode 100644 www-servers/aolserver/files/digest-aolserver-4.0.9-r1

(limited to 'www-servers/aolserver')

diff --git a/www-servers/aolserver/ChangeLog b/www-servers/aolserver/ChangeLog
index 04d1bdf30b34..dbb9f7fc6d4c 100644
--- a/www-servers/aolserver/ChangeLog
+++ b/www-servers/aolserver/ChangeLog
@@ -1,6 +1,13 @@
 # ChangeLog for www-servers/aolserver
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/aolserver/ChangeLog,v 1.4 2005/01/05 19:49:09 port001 Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/aolserver/ChangeLog,v 1.5 2005/01/05 23:35:42 port001 Exp $
+
+*aolserver-4.0.9-r1 (05 Jan 2005)
+
+  05 Jan 2005; Ian Leitch <port001@gentoo.org> +aolserver-4.0.9-r1.ebuild:
+  Create missing /var/run/aolserver (fixes init script). Create group
+  'aolserver' instead of 'web' and set aolserver user's shell to /bin/false.
+  Also provided a pkg_setup() to correct these for users who are upgrading.
 
 *aolserver-4.0.9 (05 Jan 2005)
 
diff --git a/www-servers/aolserver/Manifest b/www-servers/aolserver/Manifest
index dad53fbe21e9..602def3f3877 100644
--- a/www-servers/aolserver/Manifest
+++ b/www-servers/aolserver/Manifest
@@ -1,10 +1,9 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
 MD5 52a089f9435da0e3f5d5997199819e90 aolserver-4.0.9.ebuild 4793
 MD5 32d190764bcc56d2b9a2808ae0543d3b aolserver-4.0.8.ebuild 4793
-MD5 d0d72eb68f925e4ae80a33b7dafe923a ChangeLog 1400
+MD5 871292e6464e8a731d462396763bf663 aolserver-4.0.9-r1.ebuild 5868
+MD5 92963b378ea03677109a661466a43a31 ChangeLog 1734
 MD5 c47b641a14c525426948f6d60a4f6fae metadata.xml 403
+MD5 5bae3a9adad37c840794ce22eb4cb5b0 files/digest-aolserver-4.0.9-r1 71
 MD5 fbf53d85d098f4b3782760c5c8b90b63 files/digest-aolserver-4.0.8 71
 MD5 5bae3a9adad37c840794ce22eb4cb5b0 files/digest-aolserver-4.0.9 71
 MD5 ef896c9186113d2882eb14aeb7a0e0a6 files/4.0.8/aolserver.init 475
@@ -15,10 +14,3 @@ MD5 ef896c9186113d2882eb14aeb7a0e0a6 files/4.0.9/aolserver.init 475
 MD5 188da2cbedb4c37b6932a413fd21fead files/4.0.9/Makefile.global 127
 MD5 8283909c0fc2061c5c4d4af284ffc3e9 files/4.0.9/config.tcl 16784
 MD5 59ce0f4269f077b1875ce2ea11169904 files/4.0.9/aolserver-4.0.9-nptl.patch 440
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.0 (GNU/Linux)
-
-iD8DBQFB3ES/UxGWrFYv8KQRAqQ9AKCT+ei1op3xqtVAEQJ71NFTT6JGZACg2KgK
-uQcO3L7R1ZR/XiSt8OkvXNw=
-=wITw
------END PGP SIGNATURE-----
diff --git a/www-servers/aolserver/aolserver-4.0.9-r1.ebuild b/www-servers/aolserver/aolserver-4.0.9-r1.ebuild
new file mode 100644
index 000000000000..20fa1e3a3db3
--- /dev/null
+++ b/www-servers/aolserver/aolserver-4.0.9-r1.ebuild
@@ -0,0 +1,245 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/aolserver/aolserver-4.0.9-r1.ebuild,v 1.1 2005/01/05 23:35:42 port001 Exp $
+
+inherit eutils
+
+DESCRIPTION="Webserver with Tcl page scripting"
+HOMEPAGE="http://www.aolserver.com/"
+SRC_URI="mirror://sourceforge/aolserver/${P}-src.tar.gz"
+
+LICENSE="MPL-1.1"
+SLOT="0"
+KEYWORDS="~x86"
+
+IUSE="nptl"
+
+DEPEND=">=dev-lang/tcl-8.4.3"
+
+ns_host="ns-localhost"
+ns_etc=/etc/${PN}
+ns_pageroot=/var/www/${ns_host}
+ns_serverroot=/var/${PN}
+ns_lib=/usr/lib/${PN}/lib
+ns_bin=/usr/lib/${PN}/bin
+ns_mod=/usr/lib/${PN}/modules
+ns_data=/usr/share/${PN}
+ns_conf=/usr/share/${PN}/include
+ns_doc=/usr/share/doc/${P}
+ns_include=/usr/include/${PN}
+ns_pid=/var/run/${PN}
+ns_log=/var/log/${PN}
+
+ns_inst_bins="nsd/nsd
+	      nsthread/nsthreadtest"
+ns_inst_libs="nsd/libnsd.so
+	      nsthread/libnsthread.so
+	      nsdb/libnsdb.so
+	      nsext/libnsext.so"
+ns_inst_alibs="nspd/libnspd.a"
+ns_inst_mods="nslog/nslog.so
+	      nsperm/nsperm.so
+	      nsdb/nsdb.so
+	      nsext/nsext.so
+	      nscgi/nscgi.so
+	      nssock/nssock.so
+	      nscp/nscp.so"
+ns_inst_includes="nsd/*.h include/*.h"
+ns_inst_docs="ChangeLog
+	README
+	install-sh"
+
+check_tcl_threads() {
+
+	local threads_found=""
+
+	for tcl_install in /var/db/pkg/dev-lang/tcl*; do
+
+		# find the version of tcl installed
+		# in slot 0
+		if grep 0 ${tcl_install}/SLOT > /dev/null; then
+			# check that tcl was compiled with threads
+			# enabled
+			for candidate_flag in `cat ${tcl_install}/USE`; do
+				if [ ${candidate_flag} == threads ]; then
+					threads_found="true"
+				fi
+			done
+		fi
+	done
+
+	if [ -n "${threads_found}" ]; then
+		einfo "tcl was merged with threading enabled"
+	else
+		eerror "tcl was not merged with threading enabled."
+		eerror "please re-emerge tcl with USE=threads"
+		die "threading not enabled in tcl"
+	fi
+}
+
+pkg_setup() {
+
+	check_tcl_threads
+}
+
+src_unpack() {
+
+	unpack ${A}
+	find ${S} -type d -name CVS -prune | xargs rm -rf
+
+	if use nptl; then
+		epatch ${FILESDIR}/${PV}/aolserver-${PV}-nptl.patch
+	fi
+}
+
+src_compile() {
+
+	local myconf
+	myconf="--with-tcl=/usr/lib"
+
+	econf ${myconf} || die "econf failed"
+	emake || die "emake failed"
+}
+
+src_install () {
+
+	dodir ${ns_etc}
+	dodir ${ns_pageroot}
+	dodir ${ns_serverroot}
+	dodir ${ns_lib}
+	dodir ${ns_bin}
+	dodir ${ns_mod}
+	dodir ${ns_mod}/tcl
+	dodir ${ns_data}
+	dodir ${ns_conf}
+	dodir ${ns_doc}
+	dodir ${ns_include}
+	dodir ${ns_pid}
+	dodir ${ns_log}
+	dodir /var/run/aolserver
+	keepdir /var/run/aolserver
+
+	enewgroup aolserver
+	enewuser aolserver -1 /bin/false ${ns_data} aolserver
+
+	chown -R root:aolserver ${D}/${ns_data}
+	chmod -R g+w ${D}/${ns_data}
+	chown -R aolserver:aolserver ${D}/${ns_pageroot}
+	chmod -R g+w ${D}/${ns_pageroot}
+	chown -R aolserver:aolserver ${D}/${ns_serverroot}
+	chmod -R g+w ${D}/${ns_serverroot}
+	chown -R aolserver:aolserver ${D}/${ns_log}
+	chmod -R g+w ${D}/${ns_log}
+	chown -R aolserver:aolserver ${D}/${ns_pid}
+	chmod -R g+w ${D}/${ns_pid}
+	chown -R root:aolserver ${D}/${ns_mod}
+	chmod -R g+w ${D}/${ns_mod}
+	chown aolserver:aolserver ${D}/var/run/aolserver
+	chmod 750 ${D}/var/run/aolserver
+
+	for bin_file in ${ns_inst_bins}; do
+		dobin ${S}/${bin_file}
+	done
+
+	insinto ${ns_lib}
+	for lib_file in ${ns_inst_libs}; do
+		doins ${S}/${lib_file}
+	done
+	for alib_file in ${ns_inst_alibs}; do
+		ranlib ${S}/${alib_file}
+		doins ${S}/${alib_file}
+	done
+
+	insinto ${ns_bin}
+	for mod_file in ${ns_inst_mods}; do
+		doins ${S}/${mod_file}
+	done
+
+	insinto ${ns_include}
+	for include_file in ${ns_inst_includes}; do
+		doins ${S}/${include_file}
+	done
+
+	for doc_file in ${ns_inst_docs}; do
+		dodoc ${doc_file}
+	done
+
+	doman ${S}/doc/*.1 ${S}/doc/*.3 ${S}/doc/*.n
+
+	insinto ${ns_mod}/tcl
+	doins ${S}/tcl/*.tcl
+
+	#doins doesn't recurse
+	#insinto ${ns_pageroot}; doins -r ${S}/tests/*
+	cp -r ${S}/tests/* ${D}/${ns_pageroot}
+
+	insinto ${ns_bin}
+	doins ${S}/nsd/init.tcl
+
+	dodir ${ns_mod}/tcl/nsperm
+	insinto ${ns_mod}/tcl/nsperm
+	doins ${S}/nsperm/*.tcl
+
+	dodir ${ns_etc}/modules/nsperm
+	insinto ${ns_etc}/modules/nsperm
+	for perm_file in passwd group hosts.allow hosts.deny perms; do
+		doins nsperm/${perm_file}
+	done
+
+	insinto ${ns_data}
+	doins sample-config.tcl
+
+	insinto ${ns_conf}
+	doins ${FILESDIR}/${PV}/Makefile.global
+	newins ${S}/include/Makefile.global Makefile.global.orig
+	doins ${S}/include/Makefile.build
+	dosed "s:../include:${ns_conf}:g" /usr/share/aolserver/include/Makefile.build
+	doins ${S}/include/Makefile.module
+	dosed "s:../include:${ns_conf}:g" /usr/share/aolserver/include/Makefile.module
+
+	insinto ${ns_etc}
+	newins ${FILESDIR}/${PV}/config.tcl aolserver.tcl
+
+	exeinto /etc/init.d
+	newexe ${FILESDIR}/${PV}/aolserver.init aolserver
+	chmod 750 ${D}/etc/init.d/aolserver
+}
+
+pkg_postinst () {
+
+	echo
+	einfo "Upgrading:"
+	einfo "  Check /usr/share/aolserver/sample-config.tcl"
+	einfo "  for new configuration options that you may want"
+	einfo "  to use in your existing configuration."
+	echo
+
+	ewarn "Group and user settings for ${PN} have changed since"
+	ewarn "version 4.0.9. If you are upgrading from <= 4.0.9 it is"
+	ewarn "highly recommended you update your ${PN} user and group"
+	ewarn "settings. This can be done by running:"
+	ewarn "ebuild /var/db/pkg/www-servers/${PF}/${PF}.ebuild config"
+	ewarn "If this is your first install of ${PN}, you can safely"
+	ewarn "ignore this message."
+	echo
+}
+
+pkg_config() {
+
+	if [ -n "`egetent group web`" ]
+	then
+		ebegin "Replacing group 'web' with 'aolserver'"
+			# we already added the aolserver group earlier,
+			# so just remove the old web group.
+			groupdel web
+		eend $?
+	fi
+
+	if [ -n "`egetent passwd aolserver`" ]
+	then
+		ebegin "Updating user 'aolserver'"
+			userdel aolserver
+			enewuser aolserver -1 /bin/false ${ns_data} aolserver
+		eend $?
+	fi
+}
diff --git a/www-servers/aolserver/files/digest-aolserver-4.0.9-r1 b/www-servers/aolserver/files/digest-aolserver-4.0.9-r1
new file mode 100644
index 000000000000..16be30e95b6a
--- /dev/null
+++ b/www-servers/aolserver/files/digest-aolserver-4.0.9-r1
@@ -0,0 +1 @@
+MD5 f502e6f475c782888871fb8b5f9ed4c1 aolserver-4.0.9-src.tar.gz 591904
-- 
cgit v1.2.3-65-gdbad