Remove boost dependency, rpm will pick it up automatically (with the right package...
[libasyncio] / libasyncio.spec.in
1 @HAVE_LIBI2NCOMMON_TRUE@%define with_libi2ncommon 1
2 @HAVE_LIBI2NCOMMON_FALSE@%define with_libi2ncommon 0
3 @HAVE_LIBT2N_TRUE@%define with_t2n 1
4 @HAVE_LIBT2N_FALSE@%define with_t2n 1
5
6 Summary:   library with asynchronous io functionality
7 Name:      libasyncio
8 Version:   @VERSION@
9 Release:   1
10 License:   GPL version 2 + linking exception
11 Group:     Intranator
12 Vendor:    Intra2net AG
13 Source:    %{name}-%{version}.tar.gz
14 Buildroot: /tmp/%{name}-%{version}-root
15 Prefix:    /usr
16 Requires:  libi2ncommon >= 1.0
17 Requires:  libasynio-utils = %{version}
18 BuildRequires: libtool
19 BuildRequires: boost-devel >= 1.32.0
20 Obsoletes: libsimpleio
21
22 %description 
23 library with asynchronous io functionality
24
25
26 %package   devel
27 Summary:   library with asynchronous io functionality
28 Group:     Intranator/Development
29 Requires:  libi2ncommon-devel
30 Requires:  boost-devel >= 1.32.0
31 Obsoletes: libsimpleio-devel
32
33
34 %description devel
35 development files for library with asynchronous io functionality
36
37
38 %package utils
39 Summary:   library with asynchronous io functionality
40 Group:     Intranator
41 %if %{with_libi2ncommon}
42 Requires:  libi2ncommon >= 1.0
43 %endif
44
45 %description utils
46 A collection of util function and classes used within asyncio, but
47 are also usable for other purposes, too.
48
49
50 %package utils-devel
51 Summary:   library with asynchronous io functionality
52 Group:     Intranator/Development
53 Requires:  boost-devel >= 1.32.0
54
55 %description utils-devel
56 development files for asyncio utils.
57
58
59 %if %{with_libt2n}
60 %package t2n
61 Summary:    glue library for using t2n with libasyncio
62 Group:      Intranator
63 BuildRequires: libt2n-devel >= 0.4
64 Requires:   libt2n >= 0.4
65 Obsoletes:  libsimpleio-t2n
66
67 %description t2n
68 glue lib for using t2n with simpleio.
69
70
71 %package t2n-devel
72 Summary:    glue library for using t2n with libasyncio
73 Group:      Intranator/Development
74 Requires:   libt2n-devel >= 0.4
75
76 %description t2n-devel
77 development files for glue lib for using t2n with simpleio.
78 %endif
79
80
81
82 %prep
83 %setup -q
84
85 %build
86 export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/intranator/lib/pkgconfig
87 autoreconf --force -i
88 ./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
89 make %{?_smp_mflags}
90
91 for dir in utils asyncio; do
92     make -C $dir headerlist
93 done
94
95 make check
96
97 %install
98 make DESTDIR=$RPM_BUILD_ROOT install
99
100 # Remove unpackaged files
101 rm -f $RPM_BUILD_ROOT/usr/lib/libasyncio_utils.a
102 rm -f $RPM_BUILD_ROOT/usr/lib/libasyncio_utils.la
103
104 %clean
105 rm -fr $RPM_BUILD_ROOT
106
107 %post
108 /sbin/ldconfig
109
110 %files
111 %defattr(-,root,root)
112 %doc LICENSE COPYING.GPL
113 %{prefix}/lib/libasyncio.so*
114
115 %files devel -f headerlist.asyncio
116 %defattr(-,root,root)
117 %{prefix}/lib/libasyncio.*a*
118 %{prefix}/lib/pkgconfig/libasyncio.pc
119
120
121 %files utils
122 %defattr(-,root,root)
123 %{prefix}/lib/libasyncio_utils.so*
124
125
126 %files utils-devel -f headerlist.utils
127 %defattr(-,root,root)
128 %{prefix}/lib/libasyncio.*a*
129 %{prefix}/lib/pkgconfig/libasyncio_utils.pc
130
131
132 %if %{with_libt2n}
133 %files t2n
134 %defattr(-,root,root)
135 %doc LICENSE
136 %{prefix}/lib/libasyncio_t2n.so*
137
138 %files t2n-devel
139 %defattr(-,root,root)
140 %{prefix}/lib/libasyncio_t2n.*a*
141 %{prefix}/lib/pkgconfig/libasyncio_t2n.pc
142 %{prefix}/include/asyncio_t2n*.hpp
143 %endif