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