]> git.pld-linux.org Git - packages/libevent.git/blob - libevent.spec
- added link patch
[packages/libevent.git] / libevent.spec
1 # TODO
2 # - %attr(755,root,root) %{_bindir}/event_rpcgen.py
3 # - needs -levent: /usr/lib64/libevent_extra-1.4.so.2.1.3
4 #
5 # Conditional build:
6 %bcond_without  static_libs     # don't build static library
7 %bcond_without  dietlibc        # don't build static dietlibc library
8 #
9 Summary:        libevent - an event notification library
10 Summary(pl.UTF-8):      libevent - biblioteka powiadamiająca o zdarzeniach
11 Name:           libevent
12 Version:        1.4.14b
13 Release:        2
14 License:        BSD
15 Group:          Libraries
16 Source0:        http://www.monkey.org/~provos/%{name}-%{version}-stable.tar.gz
17 # Source0-md5:  a00e037e4d3f9e4fe9893e8a2d27918c
18 Patch0:         %{name}-fpm.patch
19 Patch1:         %{name}.fb-changes.diff
20 Patch2:         %{name}-link.patch
21 URL:            http://www.monkey.org/~provos/libevent/
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 %{?with_dietlibc:BuildRequires: dietlibc-static >= 2:0.31-5}
25 BuildRequires:  libtool
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 # to get backslash, we need to escape it from spec parser. therefore "\\|" not "\|" here
29 %define         dietarch        %(echo %{_target_cpu} | sed -e 's/i.86\\|pentium.\\|athlon/i386/;s/amd64/x86_64/;s/armv.*/arm/')
30 %define         dietlibdir      %{_prefix}/lib/dietlibc/lib-%{dietarch}
31
32 %description
33 The libevent API provides a mechanism to execute a callback function
34 when a specific event occurs on a file descriptor or after a timeout
35 has been reached. It is meant to replace the asynchronous event loop
36 found in event-driven network servers.
37
38 %description -l pl.UTF-8
39 API libevent dostarcza mechanizm do wykonywania funkcji callback,
40 kiedy nastąpiło określone zdarzenie w deskryptorze pliku lub po
41 określonym czasie. Ma to na celu zastąpienie asynchronicznych pętli w
42 sterowanych zdarzeniami usługach sieciowych.
43
44 %package devel
45 Summary:        Header files for libevent library
46 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libevent
47 Group:          Development/Libraries
48 Requires:       %{name} = %{version}-%{release}
49
50 %description devel
51 Header files for libevent library.
52
53 %description devel -l pl.UTF-8
54 Pliki nagłówkowe biblioteki libevent.
55
56 %package static
57 Summary:        Static libevent library
58 Summary(pl.UTF-8):      Statyczna biblioteka libevent
59 Group:          Development/Libraries
60 Requires:       %{name}-devel = %{version}-%{release}
61
62 %description static
63 Static libevent library.
64
65 %description static -l pl.UTF-8
66 Statyczna biblioteka libevent.
67
68 %package dietlibc
69 Summary:        Static dietlibc libevent library
70 Summary(pl.UTF-8):      Biblioteka statyczna dietlibc libevent
71 Group:          Development/Libraries
72 Requires:       %{name}-devel = %{version}-%{release}
73
74 %description dietlibc
75 Static dietlibc libevent library.
76
77 %description dietlibc -l pl.UTF-8
78 Biblioteka statyczna dietlibc libevent.
79
80 %prep
81 %setup -q -n %{name}-%{version}-stable
82 %patch0 -p1
83 %patch1 -p1
84 %patch2 -p1
85
86 %build
87 %{__libtoolize}
88 %{__aclocal}
89 %{__autoconf}
90 %{__automake}
91 %if %{with dietlibc}
92 %configure \
93         CC="diet %{__cc} %{rpmcflags} %{rpmldflags} -Os -D_BSD_SOURCE -D_EVENT_HAVE_FD_MASK" \
94         --enable-static \
95         --disable-shared
96
97 # libtool sucks, build just the libs
98 %{__make}
99 mv .libs/libevent.a diet-libevent.a
100 mv .libs/libevent_core.a diet-libevent_core.a
101 mv .libs/libevent_extra.a diet-libevent_extra.a
102 %{__make} clean
103 %endif
104
105 %configure \
106         %{!?with_static_libs:--disable-static}
107 %{__make}
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 %{?with_dietlibc:install -d $RPM_BUILD_ROOT%{dietlibdir}}
112
113 %{__make} install \
114         DESTDIR=$RPM_BUILD_ROOT
115
116 %if %{with dietlibc}
117 install diet-libevent.a $RPM_BUILD_ROOT%{dietlibdir}/libevent.a
118 install diet-libevent_core.a $RPM_BUILD_ROOT%{dietlibdir}/libevent_core.a
119 install diet-libevent_extra.a $RPM_BUILD_ROOT%{dietlibdir}/libevent_extra.a
120 %endif
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %post   -p /sbin/ldconfig
126 %postun -p /sbin/ldconfig
127
128 %files
129 %defattr(644,root,root,755)
130 %attr(755,root,root) %{_libdir}/libevent-1.4.so.*.*.*
131 %attr(755,root,root) %ghost %{_libdir}/libevent-1.4.so.2
132 %attr(755,root,root) %{_libdir}/libevent_core-1.4.so.*.*.*
133 %attr(755,root,root) %ghost %{_libdir}/libevent_core-1.4.so.2
134 %attr(755,root,root) %{_libdir}/libevent_extra-1.4.so.*.*.*
135 %attr(755,root,root) %ghost %{_libdir}/libevent_extra-1.4.so.2
136
137 %files devel
138 %defattr(644,root,root,755)
139 # R: python
140 #%attr(755,root,root) %{_bindir}/event_rpcgen.py
141 %attr(755,root,root) %{_libdir}/libevent.so
142 %attr(755,root,root) %{_libdir}/libevent_core.so
143 %attr(755,root,root) %{_libdir}/libevent_extra.so
144 %{_libdir}/libevent.la
145 %{_libdir}/libevent_core.la
146 %{_libdir}/libevent_extra.la
147 %{_includedir}/evdns.h
148 %{_includedir}/event*.h
149 %{_includedir}/evhttp.h
150 %{_includedir}/evrpc.h
151 %{_includedir}/evutil.h
152 %{_mandir}/man3/evdns.3*
153 %{_mandir}/man3/event.3*
154
155 %if %{with static_libs}
156 %files static
157 %defattr(644,root,root,755)
158 %{_libdir}/libevent.a
159 %{_libdir}/libevent_core.a
160 %{_libdir}/libevent_extra.a
161 %endif
162
163 %if %{with dietlibc}
164 %files dietlibc
165 %defattr(644,root,root,755)
166 %{dietlibdir}/libevent.a
167 %{dietlibdir}/libevent_core.a
168 %{dietlibdir}/libevent_extra.a
169 %endif
This page took 0.071181 seconds and 4 git commands to generate.