File drac.spec of Package drac

#
# spec file for package drac (Version 1.12)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           drac
BuildRequires:  db-devel
License:        BSD 3-Clause
Group:          Productivity/Networking/Email/Utilities
Url:            http://mail.cc.umanitoba.ca/drac/index.html
AutoReqProv:    on
Summary:        Dynamic Relay Authorization Control
Version:        1.12
Release:        128
Source:         drac-%{version}.tar.gz
Patch:          drac.dif
PreReq:         %insserv_prereq %fillup_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# ---------------------------------------------------------------------------

%prep
%setup -qn drac
%patch -p 1
# ---------------------------------------------------------------------------

%build
make OPTFLAGS="$RPM_OPT_FLAGS -fPIC"
# ---------------------------------------------------------------------------

%install
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man3
mkdir -p $RPM_BUILD_ROOT/sbin
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/etc/init.d
make install     EBIN=$RPM_BUILD_ROOT/usr/sbin/rpc.dracd
make install-man MAN=$RPM_BUILD_ROOT/%{_mandir}/man
install -m 644 libdrac.a $RPM_BUILD_ROOT/%{_libdir}/libdrac.a
install -m 755 rc.dracd $RPM_BUILD_ROOT/etc/init.d/dracd
ln -sf ../etc/init.d/dracd $RPM_BUILD_ROOT/sbin/rcdracd
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 sysconfig.dracd $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.dracd

%post
%{fillup_and_insserv -yn dracd}

%preun
%stop_on_removal dracd

%postun
%restart_on_update dracd
%insserv_cleanup

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc %{_mandir}/man?/*.gz
%doc COPYRIGHT Changes INSTALL PORTING README dracd.allow-sample
%attr(755,bin,bin) /usr/sbin/rpc.dracd
%{_libdir}/libdrac.a
/etc/init.d/dracd
/sbin/rcdracd
/var/adm/fillup-templates/sysconfig.dracd

%description
DRAC is a daemon that dynamically updates a relay authorization map for
sendmail. It provides a way to allow legitimate users to relay mail
through an SMTP server, while still preventing others from using it as
a spam relay. User's IP addresses are added to the map immediately
after they have authenticated to the POP or IMAP server.



Authors:
--------
    Gary Mills <mills@cc.umanitoba.ca>

%changelog
* Mon Aug 18 2008 rhafer@suse.de
- fixed init-script LSB Headers
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Oct 21 2005 mmj@suse.de
- add -lpthread to link flags
* Thu Jul 07 2005 choeger@suse.de
- link using -pie
- use -fPIC
* Thu Jun 30 2005 meissner@suse.de
- use RPM_OPT_FLAGS, fixed implicits.
* Thu Jun 24 2004 choeger@suse.de
- update to version 1.12
* Fri Oct 31 2003 choeger@suse.de
- Don't build as root
* Thu Aug 14 2003 choeger@suse.de
- Bugfix Bugzilla ID#28870:
  missing activation metadata in sysconfig template
* Wed Jul 30 2003 choeger@suse.de
- new macros for stop/restart of services on rpm update/removal
* Mon May 12 2003 ro@suse.de
- fix build with db-4.1
* Thu Dec 19 2002 choeger@suse.de
- added sysconfig metadata
* Tue Sep 17 2002 ro@suse.de
- removed bogus self-provides
* Mon Aug 05 2002 choeger@suse.de
- added Prereq
* Mon Apr 29 2002 choeger@suse.de
- added lib64 awareness
* Wed Mar 27 2002 choeger@suse.de
- moved /etc/mail/dracd.allow to /etc/dracd.allow,
  Bugzilla ID#15519
* Tue Mar 26 2002 choeger@suse.de
- migrated to new sysconfig scheme, Bugzilla ID#15498
* Mon Feb 25 2002 choeger@suse.de
- libdrac.a was executable
* Fri Nov 30 2001 choeger@suse.de
- added buildroot
- remove START_ variable
* Thu Jun 28 2001 choeger@suse.de
- update to version 1.11
- bugfix: init script was not LSB compliant, Bugzilla ID#8987
* Tue Jan 02 2001 olh@suse.de
- use script name in %%post
* Tue Nov 28 2000 kukuk@suse.de
- Move init script to /etc/init.d
* Wed Nov 22 2000 choeger@suse.de
- adopted to new init scheme
* Mon Nov 06 2000 ro@suse.de
- fixed to compile with db3 (as db_185)
* Wed May 24 2000 choeger@suse.de
- added init-scripts
* Wed May 17 2000 ro@suse.de
- fix install of man-pages
* Thu May 11 2000 choeger@suse.de
- first version, 1.10
openSUSE Build Service is sponsored by