summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authoratatat <atatat@pkgsrc.org>2002-09-19 21:40:45 +0000
committeratatat <atatat@pkgsrc.org>2002-09-19 21:40:45 +0000
commit47195b7a871163f847aef7b12cd320ccb8a6b342 (patch)
treef8cbffa0f34b77c6b34f22c52b65a353ffdaaa05 /devel
parent0f7ec6140dcf05d8e3c2961ffb56a203c07c09be (diff)
downloadpkgsrc-47195b7a871163f847aef7b12cd320ccb8a6b342.tar.gz
Initial import of a pkg for the RT ticketing system.
RT is an industrial-grade ticketing system. It lets a group of people intelligently and efficiently manage requests submitted by a community of users. RT is used by systems administrators, customer support staffs, NOCs, developers and even marketing departments at over a thousand sites around the world. This version is backed by the mysql database.
Diffstat (limited to 'devel')
-rw-r--r--devel/rt-mysql/DESCR5
-rw-r--r--devel/rt-mysql/Makefile5
-rw-r--r--devel/rt-mysql/Makefile.common126
-rw-r--r--devel/rt-mysql/PLIST327
-rw-r--r--devel/rt-mysql/distinfo5
-rw-r--r--devel/rt-mysql/files/README17
-rw-r--r--devel/rt-mysql/files/rtconfig192
-rw-r--r--devel/rt-mysql/files/wrapper.c58
-rw-r--r--devel/rt-mysql/patches/patch-aa411
9 files changed, 1146 insertions, 0 deletions
diff --git a/devel/rt-mysql/DESCR b/devel/rt-mysql/DESCR
new file mode 100644
index 00000000000..37dd341da9e
--- /dev/null
+++ b/devel/rt-mysql/DESCR
@@ -0,0 +1,5 @@
+RT is an industrial-grade ticketing system. It lets a group of
+people intelligently and efficiently manage requests submitted by
+a community of users. RT is used by systems administrators, customer
+support staffs, NOCs, developers and even marketing departments at
+over a thousand sites around the world.
diff --git a/devel/rt-mysql/Makefile b/devel/rt-mysql/Makefile
new file mode 100644
index 00000000000..72c4621457a
--- /dev/null
+++ b/devel/rt-mysql/Makefile
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/09/19 21:40:45 atatat Exp $
+
+RT_DB_TYPE= mysql
+
+.include "../../devel/rt-mysql/Makefile.common"
diff --git a/devel/rt-mysql/Makefile.common b/devel/rt-mysql/Makefile.common
new file mode 100644
index 00000000000..71de9dd8aa3
--- /dev/null
+++ b/devel/rt-mysql/Makefile.common
@@ -0,0 +1,126 @@
+# $NetBSD: Makefile.common,v 1.1.1.1 2002/09/19 21:40:45 atatat Exp $
+
+DISTNAME= rt-2-0-13
+CATEGORIES= devel
+MASTER_SITES= http://www.fsck.com/pub/rt/release/
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.fsck.com/projects/rt/
+COMMENT= Industrial-grade ticketing system
+CONFLICTS= rt-*
+
+RT_GROUP?= rt
+RT_PATH?= ${PREFIX}/rt
+RT_VAR_PATH?= /var/pkg/rt
+RT_LOG_PATH?= ${RT_VAR_PATH}/log
+RT_DATA_PATH?= ${RT_VAR_PATH}/data
+RT_SESSION_PATH?= ${RT_VAR_PATH}/sessiondata
+
+RT_DB_HOME?= ${PREFIX}
+RT_DB_DATABASE?=rt2
+RT_DB_USER?= rt
+RT_DB_PASS?= changemeplease
+
+RT_WEB_USER?= nobody
+RT_WEB_GROUP?= nobody
+
+PKGDIR= ${.CURDIR}/../../devel/rt-mysql
+DISTINFO_FILE= ${PKGDIR}/distinfo
+FILESDIR= ${PKGDIR}/files
+PATCHDIR= ${PKGDIR}/patches
+PLIST_SRC= ${PKGDIR}/PLIST
+PKG_GROUPS= ${RT_GROUP}
+CONF_FILES= ${RT_PATH}/etc/config.pm.default ${RT_PATH}/etc/config.pm
+OWN_DIRS+= ${RT_PATH}
+OWN_DIRS+= ${RT_PATH}/etc
+OWN_DIRS+= ${RT_PATH}/WebRT
+OWN_DIRS+= ${RT_VAR_PATH}
+OWN_DIRS+= ${RT_LOG_PATH}
+OWN_DIRS+= ${RT_DATA_PATH}
+OWN_DIRS+= ${RT_SESSION_PATH}
+
+REPLACE_PERL+= tools/insertdata \
+ tools/initdb
+
+.if (${RT_DB_TYPE} == "mysql")
+PKGNAME= ${DISTNAME:S/-/./g:S/./-mysql-/}
+DEPENDS+= p5-DBD-mysql-*:../../databases/p5-DBD-mysql
+RT_DB_HOST?= localhost
+RT_DB_PORT?=
+RT_DB_PATH?= ${PREFIX}/lib/mysql
+RT_DB_DBA?= root
+RT_DB_DBA_PASSWORD?=
+.elif (${RT_DB_TYPE} == "Pg")
+PKGNAME= ${DISTNAME:S/-/./g:S/./-pgsql-/}
+DEPENDS+= p5-DBD-postgresql-*:../../databases/p5-DBD-postgresql
+RT_DB_HOST?=
+RT_DB_PORT?=
+RT_DB_PATH?= ${PREFIX}/lib/postgresql
+RT_DB_DBA?= pgsql
+RT_DB_DBA_PASSWORD?=
+.else
+#
+# oracle is supposed to be an option, but not yet.
+#
+.endif
+
+DEPENDS+= p5-Digest-MD5-*:../../security/p5-Digest-MD5
+DEPENDS+= p5-Storable-*:../../devel/p5-Storable
+DEPENDS+= p5-DBI>=1.18:../../databases/p5-DBI
+DEPENDS+= p5-DBIx-DataSource>=0.02:../../databases/p5-DBIx-Datasource
+DEPENDS+= p5-DBIx-SearchBuilder>=0.48:../../databases/p5-DBIx-SearchBuilder
+DEPENDS+= p5-libwww-*:../../www/p5-libwww
+DEPENDS+= p5-MLDBM-*:../../databases/p5-MLDBM
+DEPENDS+= p5-Params-Validate>=0.02:../../devel/p5-Params-Validate
+DEPENDS+= p5-HTML-Mason>=1.02:../../www/p5-HTML-Mason
+DEPENDS+= p5-CGI-*:../../www/p5-CGI
+DEPENDS+= p5-libapreq-*:../../www/p5-libapreq
+DEPENDS+= p5-Apache-Session>=1.53:../../www/p5-Apache-Session
+DEPENDS+= p5-TimeDate-*:../../time/p5-TimeDate
+DEPENDS+= p5-MIME-tools>=5.108:../../mail/p5-MIME-tools
+DEPENDS+= p5-MailTools>=1.20:../../mail/p5-MailTools
+DEPENDS+= p5-Tie-IxHash-*:../../devel/p5-Tie-IxHash
+DEPENDS+= p5-Text-Wrapper-*:../../textproc/p5-Text-Wrapper
+DEPENDS+= p5-Text-Template-*:../../textproc/p5-Text-Template
+DEPENDS+= p5-FreezeThaw-*:../../devel/p5-FreezeThaw
+DEPENDS+= p5-Log-Dispatch-*:../../devel/p5-Log-Dispatch
+DEPENDS+= p5-Apache-DBI-[0-9]*:../../databases/p5-Apache-DBI
+
+pre-configure:
+ @${ECHO} "=> Removing CVS directories from work directory"
+ @${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -rf
+ @${CP} ${FILESDIR}/rtconfig ${WRKSRC}/rtconfig
+ @${CP} ${FILESDIR}/README ${WRKSRC}/README.pkg
+ @cd ${WRKSRC} ; \
+ for f in Makefile rtconfig README.pkg; do \
+ ${ECHO} "=> Doing RT variable replacement in $$f"; \
+ [ -f $$f.BAK ] || ${MV} $$f $$f.BAK ; \
+ ${SED} -e 's|@PREFIX@|${PREFIX}|g' \
+ -e 's|@RT_GROUP@|${RT_GROUP}|g' \
+ -e 's|@RT_PATH@|${RT_PATH}|g' \
+ -e 's|@RT_LOG_PATH@|${RT_LOG_PATH}|g' \
+ -e 's|@RT_DATA_PATH@|${RT_DATA_PATH}|g' \
+ -e 's|@RT_SESSION_PATH@|${RT_SESSION_PATH}|g' \
+ -e 's|@RT_DB_TYPE@|${RT_DB_TYPE}|g' \
+ -e 's|@RT_DB_DBA@|${RT_DB_DBA}|g' \
+ -e 's|@RT_DB_DBA_PASSWORD@|${RT_DB_DBA_PASSWORD}|g' \
+ -e 's|@RT_DB_DATABASE@|${RT_DB_DATABASE}|g' \
+ -e 's|@RT_DB_USER@|${RT_DB_USER}|g' \
+ -e 's|@RT_DB_PASS@|${RT_DB_PASS}|g' \
+ -e 's|@RT_DB_HOME@|${RT_DB_HOME}|g' \
+ -e 's|@RT_DB_HOST@|${RT_DB_HOST}|g' \
+ -e 's|@RT_DB_PORT@|${RT_DB_PORT}|g' \
+ -e 's|@RT_WEB_USER@|${RT_WEB_USER}|g' \
+ -e 's|@RT_WEB_GROUP@|${RT_WEB_GROUP}|g' < $$f.BAK > $$f; \
+ done
+
+pre-build:
+ (mkdir -p ${WRKSRC}/src; \
+ cd ${WRKSRC}/src; \
+ ${CP} ${FILESDIR}/wrapper.c .; \
+ ${ECHO} '#define RT_REAL_PATH "${RT_PATH}/bin/real"' > config.h; \
+ ${ECHO} '#define DATABASE_LIBRARY_PATH "${RT_DB_PATH}"' >> config.h; \
+ ${ECHO} '#define RT_GROUP "${RT_GROUP}"' >> config.h )
+
+.include "../../mk/bsd.pkg.install.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/rt-mysql/PLIST b/devel/rt-mysql/PLIST
new file mode 100644
index 00000000000..bc78d037b8d
--- /dev/null
+++ b/devel/rt-mysql/PLIST
@@ -0,0 +1,327 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/09/19 21:40:45 atatat Exp $
+rt/bin/mason_handler.fcgi
+rt/bin/mason_handler.scgi
+rt/bin/real/mason_handler.fcgi
+rt/bin/real/mason_handler.scgi
+rt/bin/real/rt
+rt/bin/real/rt-mailgate
+rt/bin/real/rtadmin
+rt/bin/rt
+rt/bin/rt-mailgate
+rt/bin/rtadmin
+rt/bin/webmux.pl
+rt/etc/README.pkg
+rt/etc/README.rt
+rt/etc/acl.Oracle
+rt/etc/acl.Pg
+rt/etc/acl.mysql
+rt/etc/config.pm.default
+rt/etc/initdb
+rt/etc/initacls.Oracle
+rt/etc/initacls.Pg
+rt/etc/initacls.mysql
+rt/etc/insertdata
+rt/etc/rtconfig
+rt/etc/schema.Oracle
+rt/etc/schema.Pg
+rt/etc/schema.mysql
+rt/etc/schema.pm
+rt/lib/auto/RT/.packlist
+rt/lib/RT.pm
+rt/lib/RT/ACE.pm
+rt/lib/RT/ACL.pm
+rt/lib/RT/Action/Autoreply.pm
+rt/lib/RT/Action/Generic.pm
+rt/lib/RT/Action/Notify.pm
+rt/lib/RT/Action/NotifyAsComment.pm
+rt/lib/RT/Action/OpenDependent.pm
+rt/lib/RT/Action/README.hackers
+rt/lib/RT/Action/ResolveMembers.pm
+rt/lib/RT/Action/SendEmail.pm
+rt/lib/RT/Action/SendPasswordEmail.pm
+rt/lib/RT/Action/StallDependent.pm
+rt/lib/RT/Attachment.pm
+rt/lib/RT/Attachments.pm
+rt/lib/RT/Condition/AnyTransaction.pm
+rt/lib/RT/Condition/Generic.pm
+rt/lib/RT/Condition/NewDependency.pm
+rt/lib/RT/Condition/StatusChange.pm
+rt/lib/RT/CurrentUser.pm
+rt/lib/RT/Date.pm
+rt/lib/RT/EasySearch.pm
+rt/lib/RT/Group.pm
+rt/lib/RT/GroupMember.pm
+rt/lib/RT/GroupMembers.pm
+rt/lib/RT/Groups.pm
+rt/lib/RT/Handle.pm
+rt/lib/RT/Interface/CLI.pm
+rt/lib/RT/Interface/Email.pm
+rt/lib/RT/Interface/Web.pm
+rt/lib/RT/Keyword.pm
+rt/lib/RT/Keywords.pm
+rt/lib/RT/KeywordSelect.pm
+rt/lib/RT/KeywordSelects.pm
+rt/lib/RT/Link.pm
+rt/lib/RT/Links.pm
+rt/lib/RT/ObjectKeyword.pm
+rt/lib/RT/ObjectKeywords.pm
+rt/lib/RT/Queue.pm
+rt/lib/RT/Queues.pm
+rt/lib/RT/Record.pm
+rt/lib/RT/Scrip.pm
+rt/lib/RT/ScripAction.pm
+rt/lib/RT/ScripActions.pm
+rt/lib/RT/ScripCondition.pm
+rt/lib/RT/ScripConditions.pm
+rt/lib/RT/Scrips.pm
+rt/lib/RT/Template.pm
+rt/lib/RT/Templates.pm
+rt/lib/RT/TestHarness.pm
+rt/lib/RT/Ticket.pm
+rt/lib/RT/Tickets.pm
+rt/lib/RT/Transaction.pm
+rt/lib/RT/Transactions.pm
+rt/lib/RT/User.pm
+rt/lib/RT/Users.pm
+rt/lib/RT/Watcher.pm
+rt/lib/RT/Watchers.pm
+rt/man/man3/RT.0
+rt/man/man3/RT::ACE.0
+rt/man/man3/RT::ACL.0
+rt/man/man3/RT::Action::Generic.0
+rt/man/man3/RT::Action::SendEmail.0
+rt/man/man3/RT::Action::SendPasswordEmail.0
+rt/man/man3/RT::Attachment.0
+rt/man/man3/RT::Attachments.0
+rt/man/man3/RT::Condition::Generic.0
+rt/man/man3/RT::CurrentUser.0
+rt/man/man3/RT::Date.0
+rt/man/man3/RT::EasySearch.0
+rt/man/man3/RT::Group.0
+rt/man/man3/RT::GroupMember.0
+rt/man/man3/RT::GroupMembers.0
+rt/man/man3/RT::Groups.0
+rt/man/man3/RT::Handle.0
+rt/man/man3/RT::Interface::CLI.0
+rt/man/man3/RT::Interface::Email.0
+rt/man/man3/RT::Keyword.0
+rt/man/man3/RT::Keywords.0
+rt/man/man3/RT::KeywordSelect.0
+rt/man/man3/RT::Link.0
+rt/man/man3/RT::Links.0
+rt/man/man3/RT::ObjectKeyword.0
+rt/man/man3/RT::ObjectKeywords.0
+rt/man/man3/RT::Queue.0
+rt/man/man3/RT::Queues.0
+rt/man/man3/RT::Record.0
+rt/man/man3/RT::Scrip.0
+rt/man/man3/RT::ScripAction.0
+rt/man/man3/RT::ScripActions.0
+rt/man/man3/RT::ScripCondition.0
+rt/man/man3/RT::ScripConditions.0
+rt/man/man3/RT::Scrips.0
+rt/man/man3/RT::Template.0
+rt/man/man3/RT::Templates.0
+rt/man/man3/RT::Ticket.0
+rt/man/man3/RT::Tickets.0
+rt/man/man3/RT::Transaction.0
+rt/man/man3/RT::Transactions.0
+rt/man/man3/RT::User.0
+rt/man/man3/RT::Users.0
+rt/man/man3/RT::Watcher.0
+rt/man/man3/RT::Watchers.0
+rt/WebRT/html/Admin/Elements/CreateQueueCalled
+rt/WebRT/html/Admin/Elements/CreateUserCalled
+rt/WebRT/html/Admin/Elements/EditUserComments
+rt/WebRT/html/Admin/Elements/GrantQueueRightsTo
+rt/WebRT/html/Admin/Elements/GroupTabs
+rt/WebRT/html/Admin/Elements/Header
+rt/WebRT/html/Admin/Elements/ListGlobalKeywordSelects
+rt/WebRT/html/Admin/Elements/ListGlobalScrips
+rt/WebRT/html/Admin/Elements/ModifyKeyword
+rt/WebRT/html/Admin/Elements/ModifyKeywordSelect
+rt/WebRT/html/Admin/Elements/ModifyQueue
+rt/WebRT/html/Admin/Elements/ModifyTemplate
+rt/WebRT/html/Admin/Elements/ModifyUser
+rt/WebRT/html/Admin/Elements/QueueRightsForUser
+rt/WebRT/html/Admin/Elements/QueueTabs
+rt/WebRT/html/Admin/Elements/SelectKeywordSelect
+rt/WebRT/html/Admin/Elements/SelectModifyGroup
+rt/WebRT/html/Admin/Elements/SelectModifyKeyword
+rt/WebRT/html/Admin/Elements/SelectModifyKeywordSelect
+rt/WebRT/html/Admin/Elements/SelectModifyQueue
+rt/WebRT/html/Admin/Elements/SelectModifyUser
+rt/WebRT/html/Admin/Elements/SelectQueueRights
+rt/WebRT/html/Admin/Elements/SelectRights
+rt/WebRT/html/Admin/Elements/SelectScrip
+rt/WebRT/html/Admin/Elements/SelectScripAction
+rt/WebRT/html/Admin/Elements/SelectScripCondition
+rt/WebRT/html/Admin/Elements/SelectSingleOrMultiple
+rt/WebRT/html/Admin/Elements/SelectTemplate
+rt/WebRT/html/Admin/Elements/SelectUsers
+rt/WebRT/html/Admin/Elements/SystemTabs
+rt/WebRT/html/Admin/Elements/Tabs
+rt/WebRT/html/Admin/Elements/UserTabs
+rt/WebRT/html/Admin/Global/GroupRights.html
+rt/WebRT/html/Admin/Global/index.html
+rt/WebRT/html/Admin/Global/Keywords.html
+rt/WebRT/html/Admin/Global/Scrips.html
+rt/WebRT/html/Admin/Global/Template.html
+rt/WebRT/html/Admin/Global/Templates.html
+rt/WebRT/html/Admin/Global/UserRights.html
+rt/WebRT/html/Admin/Groups/index.html
+rt/WebRT/html/Admin/Groups/Members.html
+rt/WebRT/html/Admin/Groups/Modify.html
+rt/WebRT/html/Admin/Groups/Rights.html
+rt/WebRT/html/Admin/index.html
+rt/WebRT/html/Admin/Keywords/index.html
+rt/WebRT/html/Admin/Keywords/Modify.html
+rt/WebRT/html/Admin/KeywordSelects/index.html
+rt/WebRT/html/Admin/KeywordSelects/Modify.html
+rt/WebRT/html/Admin/Queues/Create.html
+rt/WebRT/html/Admin/Queues/GroupRights.html
+rt/WebRT/html/Admin/Queues/index.html
+rt/WebRT/html/Admin/Queues/Keywords.html
+rt/WebRT/html/Admin/Queues/Modify.html
+rt/WebRT/html/Admin/Queues/People.html
+rt/WebRT/html/Admin/Queues/Scrips.html
+rt/WebRT/html/Admin/Queues/Template.html
+rt/WebRT/html/Admin/Queues/Templates.html
+rt/WebRT/html/Admin/Queues/UserRights.html
+rt/WebRT/html/Admin/Users/index.html
+rt/WebRT/html/Admin/Users/Modify.html
+rt/WebRT/html/Admin/Users/Prefs.html
+rt/WebRT/html/Admin/Users/Rights.html
+rt/WebRT/html/autohandler
+rt/WebRT/html/Elements/Checkbox
+rt/WebRT/html/Elements/CreateTicket
+rt/WebRT/html/Elements/CustomHomepageHeader
+rt/WebRT/html/Elements/dayMenu
+rt/WebRT/html/Elements/Error
+rt/WebRT/html/Elements/Footer
+rt/WebRT/html/Elements/GotoTicket
+rt/WebRT/html/Elements/Header
+rt/WebRT/html/Elements/ListActions
+rt/WebRT/html/Elements/Login
+rt/WebRT/html/Elements/MessageBox
+rt/WebRT/html/Elements/monthMenu
+rt/WebRT/html/Elements/MyRequests
+rt/WebRT/html/Elements/MyTickets
+rt/WebRT/html/Elements/Quicksearch
+rt/WebRT/html/Elements/Refresh
+rt/WebRT/html/Elements/Section
+rt/WebRT/html/Elements/SelectBoolean
+rt/WebRT/html/Elements/SelectDate
+rt/WebRT/html/Elements/SelectDateRelation
+rt/WebRT/html/Elements/SelectDateType
+rt/WebRT/html/Elements/SelectEqualityOperator
+rt/WebRT/html/Elements/SelectKeyword
+rt/WebRT/html/Elements/SelectKeywordOptions
+rt/WebRT/html/Elements/SelectLinkType
+rt/WebRT/html/Elements/SelectMatch
+rt/WebRT/html/Elements/SelectNewTicketQueue
+rt/WebRT/html/Elements/SelectOwner
+rt/WebRT/html/Elements/SelectQueue
+rt/WebRT/html/Elements/SelectResultsPerPage
+rt/WebRT/html/Elements/SelectSortOrder
+rt/WebRT/html/Elements/SelectStatus
+rt/WebRT/html/Elements/SelectTicketSortBy
+rt/WebRT/html/Elements/SelectUsers
+rt/WebRT/html/Elements/SelectWatcherType
+rt/WebRT/html/Elements/ShadedBox
+rt/WebRT/html/Elements/Submit
+rt/WebRT/html/Elements/Tabs
+rt/WebRT/html/Elements/TitleBoxEnd
+rt/WebRT/html/Elements/TitleBoxStart
+rt/WebRT/html/Elements/ViewUser
+rt/WebRT/html/Elements/yearMenu
+rt/WebRT/html/index.html
+rt/WebRT/html/NoAuth/images/rt.jpg
+rt/WebRT/html/NoAuth/images/spacer.gif
+rt/WebRT/html/NoAuth/Logout.html
+rt/WebRT/html/NoAuth/Reminder.html
+rt/WebRT/html/NoAuth/webrt.css
+rt/WebRT/html/Search/Bulk.html
+rt/WebRT/html/Search/Listing.html
+rt/WebRT/html/Search/PickRestriction
+rt/WebRT/html/Search/RestrictSearch.html
+rt/WebRT/html/Search/TicketCell
+rt/WebRT/html/SelfService/Attachment/dhandler
+rt/WebRT/html/SelfService/Closed.html
+rt/WebRT/html/SelfService/Create.html
+rt/WebRT/html/SelfService/Display.html
+rt/WebRT/html/SelfService/Elements/GotoTicket
+rt/WebRT/html/SelfService/Elements/Header
+rt/WebRT/html/SelfService/Elements/MyRequests
+rt/WebRT/html/SelfService/Elements/Tabs
+rt/WebRT/html/SelfService/Error.html
+rt/WebRT/html/SelfService/index.html
+rt/WebRT/html/SelfService/Prefs.html
+rt/WebRT/html/SelfService/Update.html
+rt/WebRT/html/Ticket/Attachment/dhandler
+rt/WebRT/html/Ticket/Create.html
+rt/WebRT/html/Ticket/Display.html
+rt/WebRT/html/Ticket/Elements/AddWatchers
+rt/WebRT/html/Ticket/Elements/EditBasics
+rt/WebRT/html/Ticket/Elements/EditDates
+rt/WebRT/html/Ticket/Elements/EditKeywordSelects
+rt/WebRT/html/Ticket/Elements/EditLinks
+rt/WebRT/html/Ticket/Elements/EditPeople
+rt/WebRT/html/Ticket/Elements/EditWatchers
+rt/WebRT/html/Ticket/Elements/ShowBasics
+rt/WebRT/html/Ticket/Elements/ShowDates
+rt/WebRT/html/Ticket/Elements/ShowDependencies
+rt/WebRT/html/Ticket/Elements/ShowHistory
+rt/WebRT/html/Ticket/Elements/ShowKeywordSelects
+rt/WebRT/html/Ticket/Elements/ShowLinks
+rt/WebRT/html/Ticket/Elements/ShowMemberOf
+rt/WebRT/html/Ticket/Elements/ShowMembers
+rt/WebRT/html/Ticket/Elements/ShowPeople
+rt/WebRT/html/Ticket/Elements/ShowReferences
+rt/WebRT/html/Ticket/Elements/ShowRequestor
+rt/WebRT/html/Ticket/Elements/ShowSummary
+rt/WebRT/html/Ticket/Elements/ShowTransaction
+rt/WebRT/html/Ticket/Elements/Tabs
+rt/WebRT/html/Ticket/Elements/ToolBar
+rt/WebRT/html/Ticket/History.html
+rt/WebRT/html/Ticket/Modify.html
+rt/WebRT/html/Ticket/ModifyAll.html
+rt/WebRT/html/Ticket/ModifyDates.html
+rt/WebRT/html/Ticket/ModifyLinks.html
+rt/WebRT/html/Ticket/ModifyPeople.html
+rt/WebRT/html/Ticket/Update.html
+rt/WebRT/html/User/Prefs.html
+@dirrm rt/WebRT/html/User
+@dirrm rt/WebRT/html/Ticket/Elements
+@dirrm rt/WebRT/html/Ticket/Attachment
+@dirrm rt/WebRT/html/Ticket
+@dirrm rt/WebRT/html/SelfService/Elements
+@dirrm rt/WebRT/html/SelfService/Attachment
+@dirrm rt/WebRT/html/SelfService
+@dirrm rt/WebRT/html/Search
+@dirrm rt/WebRT/html/NoAuth/images
+@dirrm rt/WebRT/html/NoAuth
+@dirrm rt/WebRT/html/Elements
+@dirrm rt/WebRT/html/Admin/Users
+@dirrm rt/WebRT/html/Admin/Queues
+@dirrm rt/WebRT/html/Admin/KeywordSelects
+@dirrm rt/WebRT/html/Admin/Keywords
+@dirrm rt/WebRT/html/Admin/Groups
+@dirrm rt/WebRT/html/Admin/Global
+@dirrm rt/WebRT/html/Admin/Elements
+@dirrm rt/WebRT/html/Admin
+@dirrm rt/WebRT/html
+@dirrm rt/man/man3
+@dirrm rt/man
+@dirrm rt/local/WebRT/html
+@dirrm rt/local/WebRT
+@dirrm rt/local
+@dirrm rt/lib/RT/Interface
+@dirrm rt/lib/RT/Condition
+@dirrm rt/lib/RT/Action
+@dirrm rt/lib/RT
+@dirrm rt/lib/auto/RT
+@dirrm rt/lib/auto
+@dirrm rt/lib
+@dirrm rt/bin/real
+@dirrm rt/bin
diff --git a/devel/rt-mysql/distinfo b/devel/rt-mysql/distinfo
new file mode 100644
index 00000000000..4c3304e860d
--- /dev/null
+++ b/devel/rt-mysql/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/09/19 21:40:45 atatat Exp $
+
+SHA1 (rt-2-0-13.tar.gz) = 7e7a5ec27d463bd0683242cbc7f8e0f7cbe6ea38
+Size (rt-2-0-13.tar.gz) = 346050 bytes
+SHA1 (patch-aa) = 0d79c39dc73a8c4f9672e853ddae6c50fd23035a
diff --git a/devel/rt-mysql/files/README b/devel/rt-mysql/files/README
new file mode 100644
index 00000000000..92c909c8e17
--- /dev/null
+++ b/devel/rt-mysql/files/README
@@ -0,0 +1,17 @@
+===========================================================================
+$NetBSD: README,v 1.1.1.1 2002/09/19 21:40:45 atatat Exp $
+
+You must now do post-installation configuration:
+
+(1) Make sure your database server is running.
+
+(2) Edit @RT_PATH@/etc/config.pm to suit your preferences.
+
+(3) Run rtconfig (located in @RT_PATH@/etc) to set up the database.
+
+(4) Read the README.rt file located in the same directory as this
+file. This covers issues such as how to configure your web server
+for use with rt, how to set up aliases for the email gateway, and
+cron jobs for cleaning out stale data.
+
+===========================================================================
diff --git a/devel/rt-mysql/files/rtconfig b/devel/rt-mysql/files/rtconfig
new file mode 100644
index 00000000000..26c955aa08f
--- /dev/null
+++ b/devel/rt-mysql/files/rtconfig
@@ -0,0 +1,192 @@
+#!/bin/sh
+#
+# $NetBSD: rtconfig,v 1.1.1.1 2002/09/19 21:40:45 atatat Exp $
+#
+
+nonemessage="Enter \"none\" for an empty reponse or hit enter for the default."
+query()
+{
+ _var="$1"
+ _default="$2"
+ _value=""
+
+ [ -n "$nonemessage" ] && echo "$nonemessage"
+ nonemessage=""
+ while [ -z "$_value" ]; do
+ echo -n "Enter $_var [$_default]: "
+ read _value
+ if [ -z "$_value" ]; then
+ _value="$_default"
+ break
+ elif [ "$_value" = "none" ]; then
+ _value=""
+ break
+ fi
+ done
+
+ eval $_var="$_value"
+}
+
+PERL='@PREFIX@/bin/perl'
+RT_PATH='@RT_PATH@'
+RT_ETC_PATH="${RT_PATH}/etc"
+RT_LOG_PATH='@RT_LOG_PATH@'
+RT_DATA_PATH='@RT_DATA_PATH@'
+DB_TYPE='@RT_DB_TYPE@'
+DB_HOME='@RT_DB_HOME@'
+query DB_HOST '@RT_DB_HOST@'
+DB_PORT='@RT_DB_PORT@'
+DB_RT_USER='@RT_DB_USER@'
+DB_RT_PASS='@RT_DB_PASS@'
+DB_DATABASE='@RT_DB_DATABASE@'
+query DB_DBA '@RT_DB_DBA@'
+query DB_DBA_PASSWORD '@RT_DB_DBA_PASSWORD@'
+
+if [ ! -f "${RT_DATA_PATH}/installed" ]; then
+ upgrading=false
+else
+ ODB_TYPE=`cat "${RT_DATA_PATH}/installed"`
+ if [ "$DB_TYPE" = "$ODB_TYPE" ]; then
+ upgrading=true
+ else
+ cat <<EOF
+WARNING: You cannot upgrade an RT installation from $ODB_TYPE to
+WARNING: $DB_TYPE simply by installing a new pkg. Your data will
+WARNING: need to be manually dumped and reloading from the database.
+EOF
+ exit 1
+ fi
+fi
+
+query WEB_USER '@RT_WEB_USER@'
+query WEB_GROUP '@RT_WEB_GROUP@'
+
+MASON_DATA_PATH='@RT_DATA_PATH@'
+MASON_SESSION_PATH='@RT_SESSION_PATH@'
+
+# install -> initialize.${DB_TYPE} -> createdb
+createdb()
+{
+ $upgrading && return 0
+
+ ${PERL} ${RT_PATH}/etc/initdb "${DB_TYPE}" "${DB_HOME}" \
+ "${DB_HOST}" "${DB_PORT}" \
+ "${DB_DBA}" "${DB_DATABASE}" \
+ create
+}
+
+# install -> initialize.${DB_TYPE} -> acls
+acls()
+{
+ $upgrading && return 0
+
+ echo "Note: make sure this is the same as listed in your config.pm"
+ query DB_RT_PASS "${DB_RT_PASS}"
+ sed < "${RT_ETC_PATH}/acl.${DB_TYPE}" > "${RT_ETC_PATH}/acl" \
+ -e "s/identified by [^ ]*$/identified by ${DB_RT_PASS}/" \
+ -e "s/with password '[^']*'/with password '${DB_RT_PASS}'/" \
+ -e "s/IDENTIFIED BY '[^']*'/IDENTIFIED BY '${DB_RT_PASS}'/"
+ ${RT_ETC_PATH}/initacls.${DB_TYPE} "${DB_HOME}" \
+ "${DB_HOST}" "${DB_PORT}" "${DB_DBA}" \
+ "${DB_DBA_PASSWORD}" "${DB_DATABASE}" \
+ "${RT_ETC_PATH}/acl"
+ rm "${RT_ETC_PATH}/acl"
+}
+
+# install -> initialize.mysql -> initdb.rtuser
+initdb_rtuser()
+{
+ $upgrading && return 0
+
+ ${PERL} ${RT_ETC_PATH}/initdb "${DB_TYPE}" "${DB_HOME}" \
+ "${DB_HOST}" "${DB_PORT}" \
+ "${DB_RT_USER}" "${DB_DATABASE}" \
+ insert
+}
+
+# install -> initialize.Pg -> initdb.dba
+initdb_dba()
+{
+ $upgrading && return 0
+
+ ${PERL} ${RT_ETC_PATH}/initdb "${DB_TYPE}" "${DB_HOME}" \
+ "${DB_HOST}" "${DB_PORT}" \
+ "${DB_DBA}" "${DB_DATABASE}" \
+ insert
+}
+
+# install -> upgrade -> upgrade-noclobber -> nondestruct -> fixperms
+fixperms()
+{
+ chmod 770 ${RT_LOG_PATH} \
+ ${MASON_DATA_PATH} \
+ ${MASON_SESSION_PATH}
+ chown -R ${WEB_USER} ${RT_LOG_PATH} \
+ ${MASON_DATA_PATH} \
+ ${MASON_SESSION_PATH}
+ chgrp -R ${WEB_GROUP} ${RT_LOG_PATH} \
+ ${MASON_DATA_PATH} \
+ ${MASON_SESSION_PATH}
+}
+
+# install -> insert
+insert()
+{
+ $upgrading && return 0
+
+ ${PERL} ${RT_ETC_PATH}/insertdata
+}
+
+# rt upgrade "instructions"
+rtupgrade()
+{
+ $upgrading || return 0
+
+ cat <<EOF
+
+Congratulations. RT has been upgraded. You should now check-over
+${RT_ETC_PATH}/config.pm for any necessary site customization.
+EOF
+}
+
+#
+rtinstall()
+{
+ $upgrading && return 0
+
+ cat <<EOF
+
+Congratulations. RT has been installed. From here on in, you
+should refer to the users guide (aka README.rt).
+EOF
+
+ echo "$DB_TYPE" > "${RT_DATA_PATH}/installed"
+}
+
+cd "${RT_PATH}"
+
+case "${DB_TYPE}" in
+mysql)
+ createdb # not on upgrade
+ acls # not on upgrade
+ initdb_rtuser # not on upgrade
+ fixperms
+ insert # not on upgrade
+ ;;
+
+Pg)
+ createdb # not on upgrade
+ initdb_dba # not on upgrade
+ acls # not on upgrade
+ fixperms
+ insert # not on upgrade
+ ;;
+
+*)
+ echo "what database type is ${DB_TYPE}?" >&2
+ exit 1
+ ;;
+esac
+
+rtupgrade
+rtinstall
diff --git a/devel/rt-mysql/files/wrapper.c b/devel/rt-mysql/files/wrapper.c
new file mode 100644
index 00000000000..1525c8b40b0
--- /dev/null
+++ b/devel/rt-mysql/files/wrapper.c
@@ -0,0 +1,58 @@
+/* $NetBSD: wrapper.c,v 1.1.1.1 2002/09/19 21:40:45 atatat Exp $ */
+
+#include <sys/types.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <grp.h>
+#include <err.h>
+#include <string.h>
+
+#include "config.h"
+
+int
+main(int argc, char *argv[])
+{
+ char *name, *old, *ld_library_path;
+ struct passwd *pw;
+ struct group *gr;
+ int l;
+
+ name = strrchr(argv[0], '/');
+ if (name == NULL)
+ name = argv[0];
+ else
+ name++;
+
+ if (strcmp(name, "mason_handler.fcgi") == 0)
+ argv[0] = RT_REAL_PATH "/mason_handler.fcgi";
+ else if (strcmp(name, "mason_handler.scgi") == 0)
+ argv[0] = RT_REAL_PATH "/real/";
+ else if (strcmp(name, "rt") == 0)
+ argv[0] = RT_REAL_PATH "/rt";
+ else if (strcmp(name, "rt-mailgate") == 0)
+ argv[0] = RT_REAL_PATH "/rt-mailgate";
+ else if (strcmp(name, "rtadmin") == 0)
+ argv[0] = RT_REAL_PATH "/rtadmin";
+ else
+ argv[0] = NULL;
+
+ l = strlen(DATABASE_LIBRARY_PATH) + 1;
+ old = getenv("LD_LIBRARY_PATH");
+ if (old != NULL) {
+ l += strlen(old) + 1;
+ ld_library_path = malloc(l);
+ snprintf(ld_library_path, l, "%s:%s",
+ DATABASE_LIBRARY_PATH, old);
+ } else {
+ ld_library_path = malloc(l);
+ snprintf(ld_library_path, l, "%s", DATABASE_LIBRARY_PATH);
+ }
+
+ if (setenv("LD_LIBRARY_PATH", ld_library_path, 1) != -1 &&
+ (gr = getgrnam(RT_GROUP)) != NULL &&
+ setgid(gr->gr_gid) != -1 &&
+ setuid(getuid()) != -1)
+ execv(argv[0], argv);
+
+ errx(1, "permission denied");
+}
diff --git a/devel/rt-mysql/patches/patch-aa b/devel/rt-mysql/patches/patch-aa
new file mode 100644
index 00000000000..7b9ea7b7cb7
--- /dev/null
+++ b/devel/rt-mysql/patches/patch-aa
@@ -0,0 +1,411 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/09/19 21:40:46 atatat Exp $
+
+This patch basically just rips up the standard rt Makefile so that
+we can do the two stages (installation and database configuration)
+in two completely separate steps.
+
+--- Makefile.orig Wed Mar 27 22:59:34 2002
++++ Makefile
+@@ -2,7 +2,7 @@
+ # Request Tracker is Copyright 1996-2002 Jesse Vincent <jessebestpractical.com>
+ # RT is distributed under the terms of the GNU General Public License, version 2
+
+-PERL = /usr/bin/perl
++PERL = @PREFIX@/bin/perl
+
+ RT_VERSION_MAJOR = 2
+ RT_VERSION_MINOR = 0
+@@ -15,7 +15,7 @@
+ BRANCH = HEAD
+
+ # This is the group that all of the installed files will be chgrp'ed to.
+-RTGROUP = rt
++RTGROUP = @RT_GROUP@
+
+
+ # User which should own rt binaries.
+@@ -40,7 +40,7 @@
+ # RT_PATH is the name of the directory you want make to install RT in
+ # RT must be installed in its own directory (don't set this to /usr/local)
+
+-RT_PATH = /opt/rt2
++RT_PATH = @RT_PATH@
+
+ # The rest of these paths are all configurable, but you probably don't want to
+ # put them elsewhere
+@@ -48,6 +48,7 @@
+ RT_LIB_PATH = $(RT_PATH)/lib
+ RT_ETC_PATH = $(RT_PATH)/etc
+ RT_BIN_PATH = $(RT_PATH)/bin
++WRAPPED_RT_BIN_PATH = $(RT_BIN_PATH)/real
+ RT_MAN_PATH = $(RT_PATH)/man
+ MASON_HTML_PATH = $(RT_PATH)/WebRT/html
+
+@@ -59,10 +60,10 @@
+
+ # RT needs to be able to write to MASON_DATA_PATH and MASON_SESSION_PATH
+ # RT will create and chown these directories. Don't just set them to /tmp
+-MASON_DATA_PATH = $(RT_PATH)/WebRT/data
+-MASON_SESSION_PATH = $(RT_PATH)/WebRT/sessiondata
++MASON_DATA_PATH = @RT_DATA_PATH@
++MASON_SESSION_PATH = @RT_SESSION_PATH@
+
+-RT_LOG_PATH = /tmp
++RT_LOG_PATH = @RT_LOG_PATH@
+
+ # RT_READABLE_DIR_MODE is the mode of directories that are generally meant
+ # to be accessable
+@@ -78,17 +79,22 @@
+
+ # RT_FASTCGI_HANDLER is the mason handler script for FastCGI
+ # THIS HANDLER IS NOT CURRENTLY SUPPORTED
+-RT_FASTCGI_HANDLER = $(RT_BIN_PATH)/mason_handler.fcgi
++RT_FASTCGI_HANDLER = $(WRAPPED_RT_BIN_PATH)/mason_handler.fcgi
++RT_FASTCGI_HANDLER_WRAPPER= $(RT_BIN_PATH)/mason_handler.fcgi
+
+ # RT_SPEEDYCGI_HANDLER is the mason handler script for SpeedyCGI
+ # THIS HANDLER IS NOT CURRENTLY SUPPORTED
+-RT_SPEEDYCGI_HANDLER = $(RT_BIN_PATH)/mason_handler.scgi
++RT_SPEEDYCGI_HANDLER = $(WRAPPED_RT_BIN_PATH)/mason_handler.scgi
++RT_SPEEDYCGI_HANDLER_WRAPPER= $(RT_BIN_PATH)/mason_handler.scgi
+
+ # The following are the names of the various binaries which make up RT
+
+-RT_CLI_BIN = $(RT_BIN_PATH)/rt
+-RT_CLI_ADMIN_BIN = $(RT_BIN_PATH)/rtadmin
+-RT_MAILGATE_BIN = $(RT_BIN_PATH)/rt-mailgate
++RT_CLI_BIN = $(WRAPPED_RT_BIN_PATH)/rt
++RT_CLI_ADMIN_BIN = $(WRAPPED_RT_BIN_PATH)/rtadmin
++RT_MAILGATE_BIN = $(WRAPPED_RT_BIN_PATH)/rt-mailgate
++RT_CLI_BIN_WRAPPER = $(RT_BIN_PATH)/rt
++RT_CLI_ADMIN_BIN_WRAPPER= $(RT_BIN_PATH)/rtadmin
++RT_MAILGATE_BIN_WRAPPER = $(RT_BIN_PATH)/rt-mailgate
+
+ # }}}
+
+@@ -100,13 +106,13 @@
+ # "Pg" is known to work
+ # "Oracle" is in the early stages of working.
+
+-DB_TYPE = mysql
++DB_TYPE = @RT_DB_TYPE@
+
+ # DB_HOME is where the Database's commandline tools live. $DB_HOME/bin
+ # should contain the binaries themselves, e.g. if "which mysql" gives
+ # "/usr/local/mysql/bin/mysql", $DB_HOME should be "/usr/local/mysql"
+
+-DB_HOME = /usr
++DB_HOME = @PREFIX@
+
+ # Set DBA to the name of a unix account with the proper permissions and
+ # environment to run your commandline SQL tools
+@@ -119,21 +125,21 @@
+ # For Pg, you probably want 'postgres'
+ # For oracle, you want 'system'
+
+-DB_DBA = root
+-DB_DBA_PASSWORD =
++DB_DBA = @RT_DB_DBA@
++DB_DBA_PASSWORD = @RT_DB_DBA_PASSWORD@
+
+ #
+ # Set this to the Fully Qualified Domain Name of your database server.
+ # If the database is local, rather than on a remote host, using "localhost"
+ # will greatly enhance performance.
+
+-DB_HOST = localhost
++DB_HOST = @RT_DB_HOST@
+
+ # If you're not running your database server on its default port,
+ # specifiy the port the database server is running on below.
+ # It's generally safe to leave this blank
+
+-DB_PORT =
++DB_PORT = @RT_DB_PORT@
+
+ #
+ # Set this to the canonical name of the interface RT will be talking to the
+@@ -143,21 +149,21 @@
+ # to grant those database rights by hand.
+ #
+
+-DB_RT_HOST = localhost
++DB_RT_HOST = @RT_DB_HOST@
+
+ # set this to the name you want to give to the RT database in
+ # your database server. For Oracle, this should be the name of your sid
+
+-DB_DATABASE = rt2
++DB_DATABASE = @RT_DB_DATABASE@
+
+ # Set this to the name of the rt database user
+
+-DB_RT_USER = rt_user
++DB_RT_USER = @RT_DB_USER@
+
+ # Set this to the password used by the rt database user
+ # *** Change This Before Installation***
+
+-DB_RT_PASS = rt_pass
++DB_RT_PASS = @RT_DB_PASS@
+
+ # }}}
+
+@@ -166,8 +172,8 @@
+ # The user your webserver runs as. needed so that webrt can cache mason
+ # objectcode
+
+-WEB_USER = www
+-WEB_GROUP = rt
++WEB_USER = @RT_WEB_USER@
++WEB_GROUP = @RT_WEB_GROUP@
+
+ # }}}
+
+@@ -180,7 +186,7 @@
+ @echo "Please read RT's readme before installing. Not doing so could"
+ @echo "be dangerous."
+
+-install: dirs initialize.$(DB_TYPE) upgrade insert instruct
++install: dirs initialize.$(DB_TYPE) upgrade insert
+
+ instruct:
+ @echo "Congratulations. RT has been installed. "
+@@ -189,9 +195,11 @@
+
+
+ insert: insert-install
++
++XXX-insert: # post pkg install
+ $(PERL) $(RT_ETC_PATH)/insertdata
+
+-upgrade: dirs config-replace upgrade-noclobber upgrade-instruct
++upgrade: dirs config-replace upgrade-noclobber
+
+ upgrade-instruct:
+ @echo "Congratulations. RT has been upgraded. You should now check-over"
+@@ -200,7 +208,7 @@
+ @echo " $(RT_ETC_PATH)/insertdata <version>"
+ @echo "where <version> is the version of RT you're upgrading from."
+
+-upgrade-noclobber: insert-install libs-install html-install bin-install nondestruct
++upgrade-noclobber: insert-install libs-install perl-install html-install bin-install nondestruct
+
+ nondestruct: fixperms
+
+@@ -212,8 +220,8 @@
+
+
+
+-all:
+- @echo "Read the readme."
++all: perl-build
++ @(cd src ; make wrapper)
+
+ fixperms:
+ # Make the libraries readable
+@@ -228,40 +236,54 @@
+ chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_BIN_PATH)
+ chmod $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_BIN_PATH)
+
+- chmod 0755 $(DESTDIR)/$(RT_ETC_PATH)
+- chmod 0500 $(DESTDIR)/$(RT_ETC_PATH)/*
++ chmod 0750 $(DESTDIR)/$(RT_ETC_PATH)
+
+ #TODO: the config file should probably be able to have its
+ # owner set seperately from the binaries.
+ chown -R $(BIN_OWNER) $(DESTDIR)/$(RT_ETC_PATH)
+ chgrp -R $(RTGROUP) $(DESTDIR)/$(RT_ETC_PATH)
+
+- chmod 0550 $(DESTDIR)/$(RT_CONFIG)
++ chmod 0550 $(DESTDIR)/$(RT_CONFIG).default
+
+ # Make the interfaces executable and setgid rt
+ chown $(BIN_OWNER) $(DESTDIR)/$(RT_MAILGATE_BIN) \
+ $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
+ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
+ $(DESTDIR)/$(RT_CLI_BIN) \
+- $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN) \
++ $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) \
++ $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) \
++ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) \
++ $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) \
++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER)
+
+ chgrp $(RTGROUP) $(DESTDIR)/$(RT_MAILGATE_BIN) \
+ $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
+ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
+ $(DESTDIR)/$(RT_CLI_BIN) \
+- $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN) \
++ $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) \
++ $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) \
++ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) \
++ $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) \
++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER)
+
+ chmod 0755 $(DESTDIR)/$(RT_MAILGATE_BIN) \
+ $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
+ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
+ $(DESTDIR)/$(RT_CLI_BIN) \
+- $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
+-
+- chmod g+s $(DESTDIR)/$(RT_MAILGATE_BIN) \
+- $(DESTDIR)/$(RT_FASTCGI_HANDLER) \
+- $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER) \
+- $(DESTDIR)/$(RT_CLI_BIN) \
+- $(DESTDIR)/$(RT_CLI_ADMIN_BIN)
++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN) \
++ $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) \
++ $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) \
++ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) \
++ $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) \
++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER)
++
++ chmod u+s $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER) \
++ $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER) \
++ $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER) \
++ $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) \
++ $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER)
+
+ # Make the web ui readable by all.
+ chmod -R u+rwX,go-w,go+rX $(DESTDIR)/$(MASON_HTML_PATH) \
+@@ -271,6 +293,7 @@
+ chgrp -R $(LIBS_GROUP) $(DESTDIR)/$(MASON_HTML_PATH) \
+ $(DESTDIR)/$(MASON_LOCAL_HTML_PATH)
+
++XXX-fixperms: # post pkg install
+ # Make the web ui's data dir writable
+ chmod 0770 $(DESTDIR)/$(MASON_DATA_PATH) \
+ $(DESTDIR)/$(MASON_SESSION_PATH)
+@@ -278,27 +301,36 @@
+ $(DESTDIR)/$(MASON_SESSION_PATH)
+ chgrp -R $(WEB_GROUP) $(DESTDIR)/$(MASON_DATA_PATH) \
+ $(DESTDIR)/$(MASON_SESSION_PATH)
++
+ dirs:
+ mkdir -p $(DESTDIR)/$(RT_BIN_PATH)
++ mkdir -p $(DESTDIR)/$(WRAPPED_RT_BIN_PATH)
+ mkdir -p $(DESTDIR)/$(MASON_DATA_PATH)
+ mkdir -p $(DESTDIR)/$(MASON_SESSION_PATH)
+ mkdir -p $(DESTDIR)/$(RT_ETC_PATH)
+ mkdir -p $(DESTDIR)/$(RT_LIB_PATH)
+ mkdir -p $(DESTDIR)/$(MASON_HTML_PATH)
+ mkdir -p $(DESTDIR)/$(MASON_LOCAL_HTML_PATH)
++ mkdir -p $(DESTDIR)/$(RT_LOG_PATH)
+
+ libs-install:
+ [ -d $(DESTDIR)/$(RT_LIB_PATH) ] || mkdir $(DESTDIR)/$(RT_LIB_PATH)
+ chown -R $(LIBS_OWNER) $(DESTDIR)/$(RT_LIB_PATH)
+ chgrp -R $(LIBS_GROUP) $(DESTDIR)/$(RT_LIB_PATH)
+ chmod -R $(RT_READABLE_DIR_MODE) $(DESTDIR)/$(RT_LIB_PATH)
++
++perl-build:
+ ( cd ./lib; \
+- $(PERL) Makefile.PL INSTALLSITELIB=$(DESTDIR)/$(RT_LIB_PATH) \
++ $(PERL) -p -i -e " s'!!RT_VERSION!!'$(RT_VERSION)'g;" RT.pm \
++ && $(PERL) Makefile.PL INSTALLSITELIB=$(DESTDIR)/$(RT_LIB_PATH) \
+ INSTALLMAN1DIR=$(DESTDIR)/$(RT_MAN_PATH)/man1 \
+ INSTALLMAN3DIR=$(DESTDIR)/$(RT_MAN_PATH)/man3 \
+ && make \
+ && make test \
+- && $(PERL) -p -i -e " s'!!RT_VERSION!!'$(RT_VERSION)'g;" blib/lib/RT.pm ;\
++ )
++
++perl-install:
++ ( cd ./lib; \
+ make install \
+ INSTALLSITEMAN1DIR=$(DESTDIR)/$(RT_MAN_PATH)/man1 \
+ INSTALLSITEMAN3DIR=$(DESTDIR)/$(RT_MAN_PATH)/man3 \
+@@ -320,13 +352,16 @@
+ initialize.Oracle: acls initdb.rtuser
+
+ acls:
+- cp etc/acl.$(DB_TYPE) '$(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)'
+- $(PERL) -p -i -e " s'!!DB_TYPE!!'"$(DB_TYPE)"'g;\
+- s'!!DB_HOST!!'"$(DB_HOST)"'g;\
+- s'!!DB_RT_PASS!!'"$(DB_RT_PASS)"'g;\
+- s'!!DB_RT_HOST!!'"$(DB_RT_HOST)"'g;\
+- s'!!DB_RT_USER!!'"$(DB_RT_USER)"'g;\
+- s'!!DB_DATABASE!!'"$(DB_DATABASE)"'g;" $(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)
++ cp etc/acl.* '$(DESTDIR)/$(RT_ETC_PATH)'
++ cp etc/schema.* '$(DESTDIR)/$(RT_ETC_PATH)'
++ $(PERL) -p -i -e " s@!!DB_TYPE!!@"$(DB_TYPE)"@g;\
++ s@!!DB_HOST!!@"$(DB_HOST)"@g;\
++ s@!!DB_RT_PASS!!@"$(DB_RT_PASS)"@g;\
++ s@!!DB_RT_HOST!!@"$(DB_RT_HOST)"@g;\
++ s@!!DB_RT_USER!!@"$(DB_RT_USER)"@g;\
++ s@!!DB_DATABASE!!@"$(DB_DATABASE)"@g;" $(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)
++
++XXX-acls: # post pkg install
+ bin/initacls.$(DB_TYPE) '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DBA_PASSWORD)' '$(DB_DATABASE)' '$(DESTDIR)/$(RT_ETC_PATH)/acl.$(DB_TYPE)'
+
+
+@@ -336,21 +371,35 @@
+
+
+ createdb:
++
++XXX-createdb: # post pkg installl
+ $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DATABASE)' create
+ initdb.dba:
++
++XXX-initdb.dba: # post pkg install
+ $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_DBA)' '$(DB_DATABASE)' insert
+
+ initdb.rtuser:
++
++XXX-initdb.rtuser: # post pkg install
+ $(PERL) tools/initdb '$(DB_TYPE)' '$(DB_HOME)' '$(DB_HOST)' '$(DB_PORT)' '$(DB_RT_USER)' '$(DB_DATABASE)' insert
+
+
+
+ insert-install:
+- cp -rp ./tools/insertdata \
++ cp -rp ./tools/insertdata ./tools/initdb \
+ $(DESTDIR)/$(RT_ETC_PATH)
+ $(PERL) -p -i -e " s'!!RT_ETC_PATH!!'$(RT_ETC_PATH)'g;\
+ s'!!RT_LIB_PATH!!'$(RT_LIB_PATH)'g;"\
+ $(DESTDIR)/$(RT_ETC_PATH)/insertdata
++ cp -rp ./bin/initacls.* \
++ $(DESTDIR)/$(RT_ETC_PATH)
++ cp -rp ./rtconfig \
++ $(DESTDIR)/$(RT_ETC_PATH)
++ cp -rp ./README \
++ $(DESTDIR)/$(RT_ETC_PATH)/README.rt
++ cp -rp ./README.pkg \
++ $(DESTDIR)/$(RT_ETC_PATH)
+
+ bin-install:
+ cp -p ./bin/webmux.pl $(DESTDIR)/$(RT_MODPERL_HANDLER)
+@@ -359,6 +408,11 @@
+ cp -p ./bin/rt $(DESTDIR)/$(RT_CLI_BIN)
+ cp -p ./bin/mason_handler.fcgi $(DESTDIR)/$(RT_FASTCGI_HANDLER)
+ cp -p ./bin/mason_handler.scgi $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER)
++ cp -p ./src/wrapper $(DESTDIR)/$(RT_CLI_BIN_WRAPPER)
++ ln -f $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) $(DESTDIR)/$(RT_MAILGATE_BIN_WRAPPER)
++ ln -f $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) $(DESTDIR)/$(RT_CLI_ADMIN_BIN_WRAPPER)
++ ln -f $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) $(DESTDIR)/$(RT_FASTCGI_HANDLER_WRAPPER)
++ ln -f $(DESTDIR)/$(RT_CLI_BIN_WRAPPER) $(DESTDIR)/$(RT_SPEEDYCGI_HANDLER_WRAPPER)
+
+ $(PERL) -p -i -e "s'!!RT_PATH!!'"$(RT_PATH)"'g;\
+ s'!!PERL!!'"$(PERL)"'g;\
+@@ -377,7 +431,7 @@
+ -[ -f $(DESTDIR)/$(RT_CONFIG) ] && \
+ mv $(DESTDIR)/$(RT_CONFIG) $(DESTDIR)/$(RT_CONFIG).old && \
+ chmod 000 $(DESTDIR)/$(RT_CONFIG).old
+- cp -rp ./etc/config.pm $(DESTDIR)/$(RT_CONFIG)
++ cp -rp ./etc/config.pm $(DESTDIR)/$(RT_CONFIG).default
+ $(PERL) -p -i -e "\
+ s'!!DB_TYPE!!'"$(DB_TYPE)"'g;\
+ s'!!DB_HOST!!'"$(DB_HOST)"'g;\
+@@ -391,7 +445,7 @@
+ s'!!MASON_DATA_PATH!!'"$(MASON_DATA_PATH)"'g;\
+ s'!!RT_LOG_PATH!!'"$(RT_LOG_PATH)"'g;\
+ s'!!RT_VERSION!!'"$(RT_VERSION)"'g;\
+- " $(DESTDIR)/$(RT_CONFIG)
++ " $(DESTDIR)/$(RT_CONFIG).default
+
+
+ commit: