added spec file template (spec file still included for default builds)
[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 Requires:   boost >= 1.32.0
19 BuildRequires: libtool
20 BuildRequires: boost-devel >= 1.32.0
21 Obsoletes: libsimpleio
22
23 %description 
24 library with asynchronous io functionality
25
26
27 %package   devel
28 Summary:   library with asynchronous io functionality
29 Group:     Intranator/Development
30 Requires:  libi2ncommon-devel
31 Requires:  boost-devel >= 1.32.0
32 Obsoletes: libsimpleio-devel
33
34
35 %description devel
36 development files for library with asynchronous io functionality
37
38
39 %package utils
40 Summary:   library with asynchronous io functionality
41 Group:     Intranator
42 Requires: boost >= 1.32.0
43 %if %{with_libi2ncommon}
44 Requires:  libi2ncommon >= 1.0
45 %endif
46
47 %description utils
48 A collection of util function and classes used within asyncio, but
49 are also usable for other purposes, too.
50
51
52 %package utils-devel
53 Summary:   library with asynchronous io functionality
54 Group:     Intranator/Development
55 Requires: boost-devel >= 1.32.0
56
57 %description utils-devel
58 development files for asyncio utils.
59
60
61 %if %{with_libt2n}
62 %package t2n
63 Summary:    glue library for using t2n with libasyncio
64 Group:      Intranator
65 BuildRequires: libt2n-devel >= 0.4
66 Requires:   libt2n >= 0.4
67 Obsoletes:  libsimpleio-t2n
68
69 %description t2n
70 glue lib for using t2n with simpleio.
71
72
73 %package t2n-devel
74 Summary:    glue library for using t2n with libasyncio
75 Group:      Intranator/Development
76 Requires:   libt2n-devel >= 0.4
77
78 %description t2n-devel
79 development files for glue lib for using t2n with simpleio.
80 %endif
81
82
83
84 %prep
85 %setup -q
86
87 %build
88 export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/intranator/lib/pkgconfig
89 autoreconf --force -i
90 ./configure $RPM_BUILD_WITH_OPTIMIZE --prefix=%{prefix}
91 dmake
92
93 for dir in utils asyncio; do
94     make -C $dir headerlist
95 done
96
97 dmake check
98
99 %install
100 make DESTDIR=$RPM_BUILD_ROOT install
101
102 %clean
103 rm -fr $RPM_BUILD_ROOT
104
105 %post
106 /sbin/ldconfig
107
108 %files
109 %defattr(-,root,root)
110 %doc LICENSE COPYING.GPL
111 %{prefix}/lib/libasyncio.so*
112
113 %files devel -f headerlist.asyncio
114 %defattr(-,root,root)
115 %{prefix}/lib/libasyncio.*a*
116 %{prefix}/lib/pkgconfig/libasyncio.pc
117
118
119 %files utils
120 %defattr(-,root,root)
121 %{prefix}/lib/libasyncio_utils.so*
122
123
124 %files utils-devel -f headerlist.utils
125 %defattr(-,root,root)
126 %{prefix}/lib/libasyncio.*a*
127 %{prefix}/lib/pkgconfig/libasyncio_utils.pc
128
129
130 %if %{with_libt2n}
131 %files t2n
132 %defattr(-,root,root)
133 %doc LICENSE
134 %{prefix}/lib/libasyncio_t2n.so*
135
136 %files t2n-devel
137 %defattr(-,root,root)
138 %{prefix}/lib/libasyncio_t2n.*a*
139 %{prefix}/lib/pkgconfig/libasyncio_t2n.pc
140 %{prefix}/include/asyncio_t2n*.hpp
141 %endif