* citadel.spec: don't BuildRequire newt-devel
[citadel.git] / citadel / citadel.spec
1 # $Id$
2 Summary: Citadel/UX, the flexible, powerful way to build online communities
3 Name: citadel
4 Version: 6.20p1
5 Release: 3
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 #Autoprov: false
39 ExcludeOS: hpux
40
41 %description
42 An advanced messaging system which can be used for BBS, groupware, and
43 online community applications.  It is multithreaded, client/server, database
44 driven, and accessible via a growing selection of front ends.
45
46 %prep
47 %setup -n citadel
48
49 %build
50 CFLAGS="$RPM_OPT_FLAGS" ./configure --with-pam --enable-autologin --with-ldap --without-newt --with-libical
51 make
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 mkdir -p $RPM_BUILD_ROOT/etc/pam.d
56 make root=$RPM_BUILD_ROOT install
57 touch $RPM_BUILD_ROOT/usr/local/citadel/.hushlogin
58 # Things that shouldn't be "installed" but were anyway
59 rm -f $RPM_BUILD_ROOT/"/usr/local/citadel/help/?"
60 rm -f $RPM_BUILD_ROOT/usr/local/citadel/README.txt
61 rm -rf $RPM_BUILD_ROOT/usr/local/citadel/docs
62 rm -rf $RPM_BUILD_ROOT/usr/local/citadel/techdoc
63
64 %clean
65 rm -rf "$RPM_BUILD_ROOT"
66
67 %package server
68 Summary: Citadel/UX, the flexible, powerful way to build online communities
69 Group: System Environment/Daemons
70 Requires: citadel-data
71 Obsoletes: citadel
72 Obsoletes: citadel-ux
73 Obsoletes: citadel-smtp
74 Obsoletes: citadel-pop3
75 Obsoletes: citadel-imap
76 Obsoletes: citadel-mrtg
77 Obsoletes: citadel-calendar
78 %description server
79 Citadel/UX is an advanced messaging system which can be used for BBS, email,
80 groupware and online community applications.  It is multithreaded,
81 client/server, database driven, and accessible via a growing selection of
82 front ends.
83 %defattr(-,root,root)
84 %files server
85 /etc/pam.d/citadel
86 %doc docs/*
87 %doc techdoc
88 %doc README.txt
89 %dir /usr/local/citadel/bio
90 %dir /usr/local/citadel/bitbucket
91 %dir /usr/local/citadel/files
92 %dir /usr/local/citadel/images
93 %dir /usr/local/citadel/info
94 %dir /usr/local/citadel/userpics
95 /usr/local/citadel/aidepost
96 /usr/local/citadel/base64
97 %attr(4755,root,root) /usr/local/citadel/chkpwd
98 /usr/local/citadel/citmail
99 /usr/local/citadel/citserver
100 /usr/local/citadel/msgform
101 /usr/local/citadel/sendcommand
102 /usr/local/citadel/setup
103 /usr/local/citadel/stress
104 /usr/local/citadel/userlist
105 /usr/local/citadel/utilsmenu
106 %pre server
107 # Add the "bbs" user
108 /usr/sbin/useradd -c "Citadel" -s /bin/false -r -d /usr/local/citadel \
109                 citadel 2> /dev/null || :
110 %post server
111 if [ -f /etc/inittab ]; then
112         if ! grep 'citserver' /etc/inittab > /dev/null; then
113                 echo "c1:2345:respawn:/usr/local/citadel/citserver -h/usr/local/citadel -x7 -llocal4" >> /etc/inittab
114         fi
115 fi
116 if [ -f /etc/services ]; then
117         if ! grep '^citadel' /etc/services > /dev/null; then
118                 echo "citadel           504/tcp         # citadel" >> /etc/services
119         fi
120 fi
121 cd /usr/local/citadel
122 /usr/local/citadel/setup -q
123 %postun server
124 if [ -f /etc/inittab ]; then
125         grep -v 'citserver' < /etc/inittab > /etc/inittab.new && \
126         mv -f /etc/inittab.new /etc/inittab
127         /sbin/init q
128 fi
129
130 %package data
131 Summary: Data files for the Citadel/UX messaging system.
132 Group: System Environment/Daemons
133 %description data
134 Default data files for the Citadel/UX messaging system.  These files are
135 required by the Citadel/UX server.
136 %defattr(-,root,root)
137 %files data
138 /usr/local/citadel/.hushlogin
139 #%dir /usr/local/citadel/netconfigs
140 %dir /usr/local/citadel/network
141 %dir /usr/local/citadel/network/spoolin
142 %dir /usr/local/citadel/network/spoolout
143 %dir /usr/local/citadel/network/systems
144 %config(noreplace) /usr/local/citadel/network/filterlist
145 %config(noreplace) /usr/local/citadel/network/mail.aliases
146 %config(noreplace) /usr/local/citadel/network/mailinglists
147 %config(noreplace) /usr/local/citadel/network/rnews.xref
148 %config(noreplace) /usr/local/citadel/public_clients
149 %config /usr/local/citadel/help/aide
150 %config /usr/local/citadel/help/software
151 %config /usr/local/citadel/help/floors
152 %config(noreplace) /usr/local/citadel/help/hours
153 %config /usr/local/citadel/help/intro
154 %config /usr/local/citadel/help/mail
155 %config /usr/local/citadel/help/network
156 %config /usr/local/citadel/help/nice
157 %config(noreplace) /usr/local/citadel/help/policy
158 %config /usr/local/citadel/help/summary
159 %config(noreplace) /usr/local/citadel/messages/changepw
160 %config /usr/local/citadel/messages/aideopt
161 %config(noreplace) /usr/local/citadel/messages/entermsg
162 %config /usr/local/citadel/messages/dotopt
163 %config /usr/local/citadel/messages/mainmenu
164 %config /usr/local/citadel/messages/entopt
165 %config(noreplace) /usr/local/citadel/messages/goodbye
166 %config(noreplace) /usr/local/citadel/messages/hello
167 %config /usr/local/citadel/messages/help
168 %config(noreplace) /usr/local/citadel/messages/register
169 %config(noreplace) /usr/local/citadel/messages/newuser
170 %config /usr/local/citadel/messages/readopt
171 %config(noreplace) /usr/local/citadel/messages/roomaccess
172 %config(noreplace) /usr/local/citadel/messages/unlisted
173 %post data
174 # Yes, this is supposed to be executed twice; as ? might not yet exist
175 # but we want it to be listed.  It's kludgey; sue me.
176 /bin/ls /usr/local/citadel/help > "/usr/local/citadel/help/?"
177 /bin/ls /usr/local/citadel/help > "/usr/local/citadel/help/?"
178
179 %package client
180 Summary: Client for the Citadel/UX messaging system
181 Group: Applications/Communications
182 %description client
183 This is the text client software for the Citadel/UX messaging system.
184 Install this software if you need to connect to a Citadel/UX server.
185 %defattr(-,root,root)
186 %files client
187 /usr/local/citadel/citadel
188 /usr/local/citadel/citadel.rc
189 /usr/local/citadel/whobbs
190 %post client
191 if [ -f /etc/services ]; then
192         if ! grep '^citadel' /etc/services > /dev/null; then
193                 echo "citadel           504/tcp         # citadel" >> /etc/services
194         fi
195 fi