9c2bdda58597d91a4c0faac34bb1a8af83bc8470
[citadel] / citadel / citadel.spec
1 # $Id$
2 Summary: Citadel/UX, the flexible, powerful way to build online communities
3 Name: citadel
4 Version: 6.24
5 Release: 1
6 Copyright: GPL
7 Group: Applications/Communications
8 Source0: http://my.citadel.org/download/citadel-ux-%{PACKAGE_VERSION}.tar.gz
9 Buildroot: /var/tmp/citadel-%{PACKAGE_VERSION}-root
10 #Icon: citux-64x64.xpm
11 Vendor: Citadel/UX Development Team
12 URL:  http://uncensored.citadel.org/citadel/
13
14 # I don't think we should actually Require this because we can be configured
15 # not to connect to an LDAP server. So we really only require the client
16 # libraries, and the runtime dependency on that is detected automatically by
17 # RPM.
18 #Requires: openldap-servers
19
20 # Note some of these BuildRequire's are Linux specific and possibly even
21 # distribution specific, but I am adding them FOR NOW just to document the
22 # dependencies and make it more likely that everyone is building identical
23 # packages.
24 BuildRequires: gcc
25 BuildRequires: bison
26 BuildRequires: glibc-devel
27 BuildRequires: openldap-devel
28 BuildRequires: db4-devel >= 4.1
29 BuildRequires: pam-devel
30
31 # Newt is not supported by redhat for binary compatibility with future
32 # distributions, so we've disabled it.
33 #BuildRequires: newt-devel
34
35 BuildRequires: openssl-devel
36 BuildRequires: ncurses-devel
37 BuildRequires: zlib-devel
38
39 # debuginfo packages don't get built unless this packages is installed:
40 # NB: We do not DISTRIBUTE the debuginfo packages - error
41 BuildRequires: redhat-rpm-config
42
43 #Autoprov: false
44 ExcludeOS: hpux
45
46 %description
47 An advanced messaging system which can be used for BBS, groupware, and
48 online community applications.  It is multithreaded, client/server, database
49 driven, and accessible via a growing selection of front ends.
50
51 %prep
52 %setup -n citadel
53
54 %build
55 CFLAGS="$RPM_OPT_FLAGS" ./configure --with-pam --enable-autologin --with-ldap --without-newt --with-libical
56 make
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
61 make root=$RPM_BUILD_ROOT install
62 touch $RPM_BUILD_ROOT/usr/local/citadel/.hushlogin
63 # Things that shouldn't be "installed" but were anyway
64 rm -f $RPM_BUILD_ROOT/"/usr/local/citadel/help/?"
65 rm -f $RPM_BUILD_ROOT/usr/local/citadel/README.txt
66 rm -rf $RPM_BUILD_ROOT/usr/local/citadel/docs
67 rm -rf $RPM_BUILD_ROOT/usr/local/citadel/techdoc
68
69 %clean
70 rm -rf "$RPM_BUILD_ROOT"
71
72 %package server
73 Summary: Citadel/UX, the flexible, powerful way to build online communities
74 Group: System Environment/Daemons
75 Requires: citadel-data
76 Obsoletes: citadel
77 Obsoletes: citadel-ux
78 Obsoletes: citadel-smtp
79 Obsoletes: citadel-pop3
80 Obsoletes: citadel-imap
81 Obsoletes: citadel-mrtg
82 Obsoletes: citadel-calendar
83 %description server
84 Citadel/UX is an advanced messaging system which can be used for BBS, email,
85 groupware and online community applications.  It is multithreaded,
86 client/server, database driven, and accessible via a growing selection of
87 front ends.
88 %defattr(-,root,root)
89 %files server
90 /etc/pam.d/citadel
91 %doc docs/*
92 %doc techdoc
93 %doc README.txt
94 %dir /usr/local/citadel/bio
95 %dir /usr/local/citadel/bitbucket
96 %dir /usr/local/citadel/files
97 %dir /usr/local/citadel/images
98 %dir /usr/local/citadel/info
99 %dir /usr/local/citadel/userpics
100 /usr/local/citadel/aidepost
101 /usr/local/citadel/base64
102 %attr(4755,root,root) /usr/local/citadel/chkpwd
103 /usr/local/citadel/citmail
104 /usr/local/citadel/citserver
105 /usr/local/citadel/msgform
106 /usr/local/citadel/sendcommand
107 /usr/local/citadel/setup
108 /usr/local/citadel/stress
109 /usr/local/citadel/userlist
110 /usr/local/citadel/utilsmenu
111 %pre server
112 # Add the "bbs" user
113 /usr/sbin/useradd -c "Citadel" -s /bin/false -r -d /usr/local/citadel \
114                 citadel 2> /dev/null || :
115 %post server
116 if [ -f /etc/inittab ]; then
117         if ! grep 'citserver' /etc/inittab > /dev/null; then
118                 echo "c1:2345:respawn:/usr/local/citadel/citserver -h/usr/local/citadel -x7 -llocal4" >> /etc/inittab
119         fi
120 fi
121 if [ -f /etc/services ]; then
122         if ! grep '^citadel' /etc/services > /dev/null; then
123                 echo "citadel           504/tcp         # citadel" >> /etc/services
124         fi
125 fi
126 cd /usr/local/citadel
127 /usr/local/citadel/setup -q
128 %postun server
129 if [ -f /etc/inittab ]; then
130         grep -v 'citserver' < /etc/inittab > /etc/inittab.new && \
131         mv -f /etc/inittab.new /etc/inittab
132         /sbin/init q
133 fi
134
135 %package data
136 Summary: Data files for the Citadel/UX messaging system.
137 Group: System Environment/Daemons
138 %description data
139 Default data files for the Citadel/UX messaging system.  These files are
140 required by the Citadel/UX server.
141 %defattr(-,root,root)
142 %files data
143 /usr/local/citadel/.hushlogin
144 #%dir /usr/local/citadel/netconfigs
145 %dir /usr/local/citadel/network
146 %dir /usr/local/citadel/network/spoolin
147 %dir /usr/local/citadel/network/spoolout
148 %dir /usr/local/citadel/network/systems
149 %config(noreplace) /usr/local/citadel/network/mail.aliases
150 %config(noreplace) /usr/local/citadel/public_clients
151 %config /usr/local/citadel/help/aide
152 %config /usr/local/citadel/help/software
153 %config /usr/local/citadel/help/floors
154 %config(noreplace) /usr/local/citadel/help/hours
155 %config /usr/local/citadel/help/intro
156 %config /usr/local/citadel/help/mail
157 %config /usr/local/citadel/help/network
158 %config /usr/local/citadel/help/nice
159 %config(noreplace) /usr/local/citadel/help/policy
160 %config /usr/local/citadel/help/summary
161 %config(noreplace) /usr/local/citadel/messages/changepw
162 %config /usr/local/citadel/messages/aideopt
163 %config(noreplace) /usr/local/citadel/messages/entermsg
164 %config /usr/local/citadel/messages/dotopt
165 %config /usr/local/citadel/messages/mainmenu
166 %config /usr/local/citadel/messages/entopt
167 %config(noreplace) /usr/local/citadel/messages/goodbye
168 %config(noreplace) /usr/local/citadel/messages/hello
169 %config /usr/local/citadel/messages/help
170 %config(noreplace) /usr/local/citadel/messages/register
171 %config(noreplace) /usr/local/citadel/messages/newuser
172 %config /usr/local/citadel/messages/readopt
173 %config(noreplace) /usr/local/citadel/messages/roomaccess
174 %config(noreplace) /usr/local/citadel/messages/unlisted
175 %post data
176 # Yes, this is supposed to be executed twice; as ? might not yet exist
177 # but we want it to be listed.  It's kludgey; sue me.
178 /bin/ls /usr/local/citadel/help > "/usr/local/citadel/help/?"
179 /bin/ls /usr/local/citadel/help > "/usr/local/citadel/help/?"
180
181 %package client
182 Summary: Client for the Citadel/UX messaging system
183 Group: Applications/Communications
184 %description client
185 This is the text client software for the Citadel/UX messaging system.
186 Install this software if you need to connect to a Citadel/UX server.
187 %defattr(-,root,root)
188 %files client
189 /usr/local/citadel/citadel
190 /usr/local/citadel/citadel.rc
191 /usr/local/citadel/whobbs
192 %post client
193 if [ -f /etc/services ]; then
194         if ! grep '^citadel' /etc/services > /dev/null; then
195                 echo "citadel           504/tcp         # citadel" >> /etc/services
196         fi
197 fi