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