File citadel.spec of Package citadel

# norootforbuild

Name:           citadel
Version:        7.24
Release:        0
Group:          Productivity/Networking/Email/Servers
License:        GPL
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  db-devel openldap2-devel pam-devel pkgconfig libical-devel libsieve-devel ncurses-devel zlib-devel
Prereq:         /usr/sbin/useradd, /usr/sbin/usermod, /usr/sbin/groupadd
URL:            http://www.citadel.org
Source:         %{name}-%{version}.tar.gz
Summary:        IMAP and POP3 Server Written Primarily with Security in Mind

%description
Dovecot is an IMAP and POP3 server for Linux and UNIX-like systems,
written primarily with security in mind. Although it is written in C,
it uses several coding techniques to avoid most of the common pitfalls.


%debug_package
%prep
%setup

%build
export CFLAGS="%{optflags} -g"
%if 0%{?suse_version} > 1000
    export CFLAGS="$CFLAGS -fstack-protector"
%endif
%configure \
	--prefix=/opt/citadel \
	--with-pam \
	--with-zlib \
	--with-ldap \
	--with-libical \
	--with-libsieve

%{__make}

%install
%makeinstall docdir=%{_docdir}/%{pkg_name} wikidir=%{_docdir}/%{pkg_name}/wiki

%clean
%{__rm} -rf "%{buildroot}"

%pre
#/usr/sbin/groupadd -r %{name} &>/dev/null || :
#/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "User for Dovecot imapd" -d %{_var}/run/%{pkg_name} %{pkg_name} &>/dev/null || :

%preun
%stop_on_removal %{name}

%post
%fillup_and_insserv -f %{name}

%postun
%insserv_cleanup
%restart_on_update %{name}

%files
%defattr(-,root,root)
%doc /opt/citadel/README.txt
%doc /opt/citadel/docs/*
%doc /opt/citadel/techdoc/*
/opt/citadel/messages/*
/opt/citadel/help/*
   /opt/citadel/aidepost
   /opt/citadel/base64
   /opt/citadel/chkpwd
   /opt/citadel/citadel
   /opt/citadel/citadel.rc
   /opt/citadel/citmail
   /opt/citadel/citserver
   /opt/citadel/database_cleanup.sh
   /opt/citadel/msgform
   /opt/citadel/network/mail.aliases
   /opt/citadel/public_clients
   /opt/citadel/sendcommand
   /opt/citadel/setup
   /opt/citadel/stress
   /opt/citadel/userlist
   /opt/citadel/whobbs


%changelog
openSUSE Build Service is sponsored by