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