]>
Commit | Line | Data |
---|---|---|
45a07906 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
4 | %bcond_without static_libs # don't build static libraries | |
5 | %bcond_without tests # skip tests | |
6 | ||
7 | Summary: LIBrary for Asynchronous File Descriptor Transfer | |
8 | Name: libafdt | |
9 | Version: 0.1.0 | |
10 | Release: 1 | |
11 | License: BSD | |
12 | Group: Libraries | |
13 | Source0: http://downloads.sourceforge.net/project/libafdt/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: 8051b4e88c5804ce34e221cb62c5e672 | |
0b9dc8d2 | 15 | URL: http://facebook.github.io/libafdt/ |
18e94acb | 16 | Patch0: %{name}-link.patch |
17 | BuildRequires: autoconf | |
18 | BuildRequires: automake | |
42e206ff | 19 | %{?with_apidocs:BuildRequires: doxygen} |
cad68189 | 20 | BuildRequires: libevent-devel >= 1.4.5 |
18e94acb | 21 | BuildRequires: libtool |
45a07906 ER |
22 | %{?with_tests:BuildRequires: python} |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | libafdt is a library for "a"synchronous "f"ile "d"escriptor | |
27 | "t"ransfers. It provides a simple interface that allows libevent-based | |
28 | programs to set up a Unix domain socket to accept connections and | |
29 | transfer file descriptors to clients, or to be a client and request a | |
30 | file descriptor from a libafdt server. Low-level and synchronous | |
31 | interfaces are also provided for programs that do not use libevent. | |
32 | ||
33 | %package devel | |
34 | Summary: Header files for libafdt library | |
35 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libafdt | |
36 | Group: Development/Libraries | |
37 | Requires: %{name} = %{version}-%{release} | |
38 | ||
39 | %description devel | |
40 | Header files for libafdt library. | |
41 | ||
42 | %description devel -l pl.UTF-8 | |
43 | Pliki nagłówkowe biblioteki libafdt. | |
44 | ||
45 | %package static | |
46 | Summary: Static libafdt library | |
47 | Summary(pl.UTF-8): Statyczna biblioteka libafdt | |
48 | Group: Development/Libraries | |
49 | Requires: %{name}-devel = %{version}-%{release} | |
50 | ||
51 | %description static | |
52 | Static libafdt library. | |
53 | ||
54 | %description static -l pl.UTF-8 | |
55 | Statyczna biblioteka libafdt. | |
56 | ||
57 | %package apidocs | |
58 | Summary: libafdt API documentation | |
59 | Summary(pl.UTF-8): Dokumentacja API biblioteki libafdt | |
60 | Group: Documentation | |
61 | ||
62 | %description apidocs | |
63 | API and internal documentation for libafdt library. | |
64 | ||
65 | %description apidocs -l pl.UTF-8 | |
66 | Dokumentacja API biblioteki libafdt. | |
67 | ||
68 | %prep | |
69 | %setup -q | |
18e94acb | 70 | %patch0 -p1 |
45a07906 ER |
71 | |
72 | %build | |
18e94acb | 73 | %{__libtoolize} |
74 | %{__aclocal} -I m4 | |
75 | %{__autoconf} | |
76 | %{__automake} | |
45a07906 ER |
77 | %configure \ |
78 | --enable-shared \ | |
79 | %{!?with_static_libs:--disable-static} | |
80 | ||
81 | %{__make} | |
82 | ||
83 | %{?with_tests:%{__make} check} | |
84 | ||
85 | %{?with_apidocs:doxygen} | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | %{__make} install \ | |
90 | DESTDIR=$RPM_BUILD_ROOT | |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post -p /sbin/ldconfig | |
96 | %postun -p /sbin/ldconfig | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
100 | %doc README | |
101 | %attr(755,root,root) %{_libdir}/libafdt.so.*.*.* | |
102 | %attr(755,root,root) %ghost %{_libdir}/libafdt.so.0 | |
103 | ||
104 | %files devel | |
105 | %defattr(644,root,root,755) | |
106 | %{_libdir}/libafdt.so | |
107 | %{_libdir}/libafdt.la | |
108 | %{_includedir}/afdt.h | |
109 | ||
110 | %files static | |
111 | %defattr(644,root,root,755) | |
112 | %{_libdir}/libafdt.a | |
113 | ||
114 | %if %{with apidocs} | |
115 | %files apidocs | |
116 | %defattr(644,root,root,755) | |
117 | %doc doxygen-out/html/* | |
118 | %endif |