10043
|
1 |
#
|
|
2 |
# spec file for package libdaemon
|
|
3 |
#
|
17469
|
4 |
# Copyright (c) 2010 Sun Microsystems, Inc.
|
10043
|
5 |
# This file and all modifications and additions to the pristine
|
|
6 |
# package are under the same license as the package itself.
|
|
7 |
#
|
16434
|
8 |
%define owner padraig
|
16297
|
9 |
#
|
16430
|
10 |
|
|
11 |
%define OSR 6984:0.12
|
|
12 |
|
10043
|
13 |
Name: libdaemon
|
17469
|
14 |
License: LGPLv2.1
|
10043
|
15 |
Group: System/Libraries
|
17469
|
16 |
Version: 0.14
|
10043
|
17 |
Release: 1
|
|
18 |
Distribution: Java Desktop System
|
17864
|
19 |
Vendor: 0pointer.de
|
10043
|
20 |
Summary: Lightweight C library for writing Unix daemons
|
|
21 |
Source: http://0pointer.de/lennart/projects/libdaemon/%{name}-%{version}.tar.gz
|
17469
|
22 |
Patch1: libdaemon-01-configure.diff
|
10043
|
23 |
URL: http://0pointer.de/lennart/projects/libdaemon/
|
|
24 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
25 |
Docdir: %{_defaultdocdir}/doc
|
|
26 |
Autoreqprov: on
|
|
27 |
Prereq: /sbin/ldconfig
|
|
28 |
|
|
29 |
%description
|
|
30 |
libdaemon is a lightweight C library which eases the writing of UNIX daemons.
|
|
31 |
It consists of the following parts:
|
|
32 |
|
|
33 |
- A wrapper around fork() which does the correct daemonization procedure of
|
|
34 |
a process
|
|
35 |
- A wrappeer around syslog() for simpler and compatible log output to Syslog
|
|
36 |
or STDERR
|
|
37 |
- An API for writing PID files
|
|
38 |
- An API for serializing UNIX signals into a pipe for usage with select()
|
|
39 |
or poll()
|
|
40 |
- an API for running subprocesses with STDOUT and STDERR redirected to syslog
|
|
41 |
|
|
42 |
%package devel
|
|
43 |
Summary: A lightweight C library for writing UNXI daemons.
|
|
44 |
Group: Development/Libraries
|
|
45 |
Requires: %{name} = %{version}
|
|
46 |
|
|
47 |
%description devel
|
|
48 |
libdaemon is a lightweight C library which eases the writing of UNIX daemons.
|
|
49 |
It consists of the following parts:
|
|
50 |
|
|
51 |
- A wrapper around fork() which does the correct daemonization procedure of
|
|
52 |
a process
|
|
53 |
- A wrappeer around syslog() for simpler and compatible log output to Syslog
|
|
54 |
or STDERR
|
|
55 |
- An API for writing PID files
|
|
56 |
- An API for serializing UNIX signals into a pipe for usage with select()
|
|
57 |
or poll()
|
|
58 |
- an API for running subprocesses with STDOUT and STDERR redirected to syslog
|
|
59 |
|
|
60 |
%prep
|
|
61 |
%setup -q
|
16143
|
62 |
%patch1 -p1
|
10043
|
63 |
|
|
64 |
%build
|
|
65 |
%ifos linux
|
|
66 |
if [ -x /usr/bin/getconf ]; then
|
|
67 |
CPUS=`getconf _NPROCESSORS_ONLN`
|
|
68 |
fi
|
|
69 |
%else
|
|
70 |
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
|
|
71 |
%endif
|
|
72 |
if test "x$CPUS" = "x" -o $CPUS = 0; then
|
|
73 |
CPUS=1
|
|
74 |
fi
|
|
75 |
|
|
76 |
CONFLAGS="--prefix=%{_prefix} --disable-lynx"
|
17469
|
77 |
aclocal $ACLOCAL_FLAGS -I ./m4
|
10043
|
78 |
autoconf
|
17469
|
79 |
automake -a -c -f
|
10043
|
80 |
CFLAGS="$RPM_OPT_FLAGS"
|
|
81 |
./configure $CONFLAGS
|
|
82 |
|
|
83 |
make -j $CPUS
|
|
84 |
|
|
85 |
%install
|
|
86 |
|
|
87 |
make DESTDIR=$RPM_BUILD_ROOT install
|
|
88 |
rm -rf $RPM_BUILD_ROOT%{_libdir}/libdaemon*a
|
|
89 |
|
|
90 |
%clean
|
|
91 |
rm -rf $RPM_BUILD_ROOT
|
|
92 |
|
|
93 |
%post
|
|
94 |
/sbin/ldconfig
|
|
95 |
|
|
96 |
%postun
|
|
97 |
/sbin/ldconfig
|
|
98 |
|
|
99 |
%files
|
|
100 |
%defattr(-, root, root)
|
|
101 |
%{_libdir}/libdaemon*.so*
|
|
102 |
|
|
103 |
%files devel
|
|
104 |
%defattr(-, root, root)
|
|
105 |
%{_libdir}/*.so
|
|
106 |
%{_includedir}/libdaemon/*
|
|
107 |
%{_libdir}/pkgconfig/*
|
|
108 |
|
|
109 |
%changelog
|
17469
|
110 |
* Thu Jan 28 2010 - [email protected]
|
|
111 |
- Bump to 0.14.
|
16143
|
112 |
* Tue Jul 28 2009 - [email protected]
|
|
113 |
- Bump to 0.13.
|
|
114 |
- Add patch to fix build issue.
|
10361
|
115 |
* Wed Aug 22 2006 - [email protected]
|
|
116 |
- Bump to 0.12.
|
10043
|
117 |
* Mon May 29 2006 - [email protected]
|
|
118 |
- Initial spec file for libdaemon.
|