226 lines
6.9 KiB
RPMSpec
226 lines
6.9 KiB
RPMSpec
#
|
|
# spec file for package libdaemon (Version 0.13)
|
|
#
|
|
# Copyright (c) 2009 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: libdaemon
|
|
BuildRequires: doxygen
|
|
Url: http://0pointer.de/lennart/projects/libdaemon/
|
|
Version: 0.13
|
|
Release: 3
|
|
Summary: Lightweight C library That Eases the Writing of UNIX Daemons
|
|
License: LGPL v2.1 or later
|
|
Group: System/Libraries
|
|
Source: %{name}-%{version}.tar.bz2
|
|
Patch2: libdaemon-0.12-bnc449728.diff
|
|
Patch3: libdaemon-0.13-bnc469342.diff
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%package -n libdaemon0
|
|
License: LGPL v2.1 or later
|
|
Summary: Lightweight C library That Eases the Writing of UNIX Daemons
|
|
Group: System/Libraries
|
|
Provides: %{name} = %{version}
|
|
#opensuse 10.3
|
|
Obsoletes: %{name} <= 0.12
|
|
|
|
%description -n libdaemon0
|
|
libdaemon is a lightweight C library that eases the writing of UNIX
|
|
daemons. It consists of the following parts:
|
|
|
|
* A wrapper around fork() that does the correct daemonization
|
|
procedure of a process
|
|
|
|
* A wrapper around syslog() for simpler log output compatible with
|
|
syslog or STDERR
|
|
|
|
* An API for writing PID files
|
|
|
|
* An API for serializing UNIX signals into a pipe for usage with
|
|
select() or poll()
|
|
|
|
* An API for running subprocesses with STDOUT and STDERR redirected
|
|
to syslog
|
|
|
|
APIs like these are used in most daemon software available. It is not
|
|
that simple to get it done right and code duplication is not a goal.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Lennart Poettering <mzqnrzba (at) 0pointer (dot) de>
|
|
|
|
%package devel
|
|
License: GPL v2 or later
|
|
Summary: libdaemon is a lightweight C library that eases the writing of UNIX daemons.
|
|
Group: Development/Libraries/C and C++
|
|
Requires: libdaemon0 = %{version} glibc-devel
|
|
|
|
%description
|
|
libdaemon is a lightweight C library that eases the writing of UNIX
|
|
daemons. It consists of the following parts:
|
|
|
|
* A wrapper around fork() that does the correct daemonization
|
|
procedure of a process
|
|
|
|
* A wrapper around syslog() for simpler log output compatible with
|
|
syslog or STDERR
|
|
|
|
* An API for writing PID files
|
|
|
|
* An API for serializing UNIX signals into a pipe for usage with
|
|
select() or poll()
|
|
|
|
* An API for running subprocesses with STDOUT and STDERR redirected
|
|
to syslog
|
|
|
|
APIs like these are used in most daemon software available. It is not
|
|
that simple to get it done right and code duplication is not a goal.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Lennart Poettering <mzqnrzba (at) 0pointer (dot) de>
|
|
|
|
%description devel
|
|
libdaemon is a lightweight C library that eases the writing of UNIX
|
|
daemons. It consists of the following parts:
|
|
|
|
* A wrapper around fork() which does the correct daemonization
|
|
procedure of a process
|
|
|
|
* A wrapper around syslog() for simpler and compatible log output to
|
|
Syslog or STDERR
|
|
|
|
* An API for writing PID files
|
|
|
|
* An API for serializing UNIX signals into a pipe for usage with
|
|
select() or poll()
|
|
|
|
* An API for running subprocesses with STDOUT and STDERR redirected
|
|
to syslog.
|
|
|
|
APIs like these are used in most daemon software available. It is not
|
|
that simple to get it done right and code duplication is not a goal.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Lennart Poettering <mzqnrzba (at) 0pointer (dot) de>
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
|
|
%build
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
%configure --libdir=/%{_lib} --disable-lynx --disable-static --with-pic
|
|
%{__make} %{?jobs:-j%jobs}
|
|
|
|
%install
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
rm -f %{buildroot}/%{_lib}/libdaemon.la
|
|
%{__install} -d -m 0755 %{buildroot}%{_libdir}/pkgconfig
|
|
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/%{name}.so) %{buildroot}%{_libdir}/%{name}.so
|
|
%{__rm} -v %{buildroot}/%{_lib}/%{name}.so
|
|
%{__mv} -v %{buildroot}/%{_lib}/pkgconfig/%{name}.pc %{buildroot}%{_libdir}/pkgconfig
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%post -n libdaemon0 -p /sbin/ldconfig
|
|
|
|
%postun -n libdaemon0 -p /sbin/ldconfig
|
|
|
|
%files -n libdaemon0
|
|
%defattr (-,root,root)
|
|
/%{_lib}/libdaemon.so.0*
|
|
|
|
%files devel
|
|
%defattr (-,root,root)
|
|
%{_libdir}/libdaemon.so
|
|
%{_libdir}/pkgconfig/libdaemon.pc
|
|
%dir %{_includedir}/libdaemon
|
|
%{_includedir}/libdaemon/*.h
|
|
|
|
%changelog
|
|
* Wed Feb 04 2009 crrodriguez@suse.de
|
|
- move shared libraries to /%%{_lib} so ifplugd can use them
|
|
- remove static libraries again
|
|
* Tue Jan 27 2009 seife@suse.de
|
|
- mark filedescritor as closed after closing it, preventing
|
|
application errors in e.g. avahi (bnc#469342, bnc#442210)
|
|
Thanks to Stefan Thaeter for providing the patch.
|
|
* Thu Nov 27 2008 seife@suse.de
|
|
- update to version 0.13:
|
|
- add daemon_reset_sigs() and daemon_unblock_sigs()
|
|
- improve error handling
|
|
- obsoletes bnc-309132.patch, libdaemon-0.10-testd-fix-FD_SET.diff
|
|
* Thu Nov 27 2008 seife@suse.de
|
|
- fix compiler warning (bnc#449728)
|
|
* Tue Dec 18 2007 seife@suse.de
|
|
- reenabled static libraries to fix ifplugd build
|
|
* Wed Nov 28 2007 crrodriguez@suse.de
|
|
- libdaemon --> libdaemon0
|
|
- remove static libraries
|
|
- remove "la" files
|
|
- fix -devel package dependencies
|
|
* Thu Sep 13 2007 mauro@suse.de
|
|
- Applied a patch from upstream, to fix bnc #309132.
|
|
* Sun Jul 22 2007 coolo@suse.de
|
|
- disable lynx as it adds little featurewise (the README is packaged
|
|
in the tar), but make libdaemon build pretty late and we need it
|
|
* Wed Jul 11 2007 seife@suse.de
|
|
- Update to version 0.12
|
|
+ make daemon_close_all() actually work properly
|
|
* Tue Jul 03 2007 maw@suse.de
|
|
- Update to version 0.11
|
|
+ automatically detect whether lynx is installed
|
|
+ properly set errno on every error condition
|
|
+ add new function daemon_close_all() to close all open file
|
|
descriptors except a given set
|
|
+ add daemon_logv(), which is identical to daemon_log(), but
|
|
takes a va_list argument
|
|
+ add daemon_execv() in similar style
|
|
+ other fixes
|
|
- Remove upstreamed libdaemon-attributes.patch.
|
|
* Thu Dec 14 2006 seife@suse.de
|
|
- fix testd build
|
|
* Wed Jan 25 2006 mls@suse.de
|
|
- converted neededforbuild to BuildRequires
|
|
* Sun Jan 22 2006 cthiel@suse.de
|
|
- update to version 0.10
|
|
* Mon Oct 31 2005 dmueller@suse.de
|
|
- don't build as root
|
|
* Fri Sep 23 2005 sbrabec@suse.cz
|
|
- Fixed devel dependencies.
|
|
* Tue May 31 2005 ro@suse.de
|
|
- fix libdir in pkgconfig file
|
|
* Sat Feb 05 2005 meissner@suse.de
|
|
- added attributes
|
|
* Wed Jan 19 2005 seife@suse.de
|
|
- update to version 0.7
|
|
* Thu Aug 12 2004 seife@suse.de
|
|
- add libpng to neededforbuild (now required by doxygen)
|
|
* Mon Jun 21 2004 seife@suse.de
|
|
- initial package submission
|