78a0ce94b51157684931f41da77aa3f540eedf31
[framework/uifw/ecore.git] / ecore.spec.in
1 # Conditional build stuff; from rpm 4.4 /usr/lib/rpm/macros.
2 # bcond_without defaults to WITH, and vice versa.  Yes, it's
3 # ass-backward.  Blame PLD.
4 # from KainX's changes to evas... 
5 %if %{!?with:1}0
6 %define with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
7 %endif
8 %if %{!?without:1}0
9 %define without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
10 %endif
11 %if %{!?bcond_with:1}0
12 %define bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
13 %endif
14 %if %{!?bcond_without:1}0
15 %define bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
16 %endif
17
18 ## disabled features
19 %bcond_with lib_ecore_directfb
20 %bcond_with lib_ecore_sdl
21
22 ## enabled features
23 ##%bcond_without module_engine_software_x11
24 %bcond_without lib_ecore_fb
25 %bcond_without lib_ecore_imf
26
27 # This just keeps a missing doxygen from killing the build.
28 %define _missing_doc_files_terminate_build 0
29
30 %define breq_lib_ecore_directfb     %{?with_lib_ecore_directfb:DirectFB}
31 %define breq_lib_ecore_sdl          %{?with_lib_ecore_sdl:SDL-devel}
32
33 %define ac_with_lib_ecore_directfb  --%{?with_lib_ecore_directfb:en}%{!?with_lib_ecore_directfb:dis}able-ecore-directfb
34 %define ac_with_lib_ecore_fb        --%{?with_lib_ecore_fb:en}%{!?with_lib_ecore_fb:dis}able-ecore-fb
35 %define ac_with_lib_ecore_imf       --%{?with_lib_ecore_imf:en}%{!?with_lib_ecore_imf:dis}able-ecore-imf
36 %define ac_with_lib_ecore_sdl       --%{?with_lib_ecore_sdl:en}%{!?with_lib_ecore_sdl:dis}able-ecore-sdl
37
38 Summary: Enlightened Core X interface library
39 Name: @PACKAGE@
40 Version: @VERSION@
41 Release: 0.%(date '+%Y%m%d')
42 License: BSD
43 Group: User Interface/X
44 Source: %{name}-%{version}.tar.gz
45 URL: http://www.enlightenment.org
46 Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
47 Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
48 Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
49 #BuildSuggests: xorg-x11-devel, XFree86-devel, libX11-devel
50 BuildRequires: libjpeg-devel, openssl-devel %{?breq_lib_ecore_directfb}
51 BuildRequires: curl-devel, evas-devel, eet-devel %{?breq_lib_ecore_sdl}
52 BuildRoot: %{_tmppath}/%{name}-%{version}-root
53
54 %description
55 Ecore is the event/X abstraction layer that makes doing selections,
56 Xdnd, general X stuff, event loops, timeouts and idle handlers fast,
57 optimized, and convenient. It's a separate library so anyone can make
58 use of the work put into Ecore to make this job easy for applications.
59
60 %package devel
61 Summary: Ecore headers and development libraries.
62 Group: Development/Libraries
63 Requires: %{name} = %{version}
64 Requires: curl-devel, openssl-devel, evas-devel, eet-devel
65 Requires: ecore-bin, ecore-con, ecore-config, ecore-evas, ecore-file, ecore-ipc, ecore-job, ecore-txt
66 Requires: ecore-x %{?with_lib_ecore_fb:ecore-fb} %{?with_lib_ecore_directfb:ecore-directfb}
67
68 %description devel
69 Ecore development files
70
71 %package bin
72 Summary: Tools that support Ecore
73 Group: Development/Libraries
74 Requires: %{name} = %{version}
75
76 %description bin
77 Tools that support Ecore
78
79 %package con
80 Summary: Ecore Connection Library
81 Group: Development/Libraries
82 Requires: %{name} = %{version}
83
84 %description con
85 Ecore Connection Library
86
87 %package config
88 Summary: Ecore Enlightened Property Library
89 Group: Development/Libraries
90 Requires: %{name} = %{version}
91
92 %description config
93 Ecore Enlightened Property Library
94
95 %if %{with lib_ecore_directfb}
96 %package directfb
97 Summary: Ecore DirectFB system functions
98 Group: Development/Libraries
99 Requires: %{name} = %{version}
100 %description directfb
101 Ecore DirectFB system functions
102 %endif
103
104 %package evas
105 Summary: Ecore Evas Wrapper Library
106 Group: Development/Libraries
107 Requires: %{name} = %{version}
108
109 %description evas
110 Ecore Evas Wrapper Library
111
112 %if %{with lib_ecore_fb}
113 %package fb
114 Summary: Ecore frame buffer system functions
115 Group: Development/Libraries
116 Requires: %{name} = %{version}
117 %description fb
118 Ecore frame buffer system functions
119 %endif
120
121 %package file
122 Summary: Ecore File Library
123 Group: Development/Libraries
124 Requires: %{name} = %{version}
125
126 %description file
127 Ecore File Library
128
129 %if %{with lib_ecore_imf}
130 %package imf
131 Summary: Ecore IMF functions
132 Group: Development/Libraries
133 Requires: %{name} = %{version}
134 %description imf
135 Ecore IMF functions
136 %endif
137
138 %package ipc
139 Summary: Ecore inter-process communication functions
140 Group: Development/Libraries
141 Requires: %{name} = %{version}
142
143 %description ipc
144 Ecore inter-process communication functions
145
146 %package job
147 Summary: Ecore job dealing functions
148 Group: Development/Libraries
149 Requires: %{name} = %{version}
150
151 %description job
152 Ecore job dealing functions
153
154 %package txt
155 Summary: Ecore text encoding conversion functions
156 Group: Development/Libraries
157 Requires: %{name} = %{version}
158
159 %description txt
160 Ecore text encoding conversion functions
161
162 %package x
163 Summary: Ecore functions for dealing with the X Windows System
164 Group: Development/Libraries
165 Requires: %{name} = %{version}
166
167 %description x
168 Ecore functions for dealing with the X Windows System
169
170 %prep
171 %setup -q -n %{name}-%{version}
172
173 %build
174 CFLAGS="-I/usr/kerberos/include -I/usr/X11R6/include/X11/extensions"
175 LDFLAGS="-L/usr/kerberos/lib -L/usr/X11R6/%{_lib}"
176 export CFLAGS LDFLAGS
177 %{configure} --prefix=%{_prefix} \
178     %{?ac_with_lib_ecore_directfb} \
179     %{?ac_with_lib_ecore_fb} \
180     %{?ac_with_lib_ecore_imf} \
181     %{?ac_with_lib_ecore_sdl}
182
183 %{__make} %{?_smp_mflags} %{?mflags}
184
185 %install
186 %{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
187
188 %post
189 /sbin/ldconfig || :
190
191 %postun
192 /sbin/ldconfig || :
193
194 %clean
195 test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
196
197 %files
198 %defattr(-, root, root)
199 %doc AUTHORS COPYING* README*
200 %{_libdir}/libecore.so.*
201
202 %files devel
203 %defattr(-, root, root)
204 %doc doc/html
205 %{_libdir}/*.so
206 %{_libdir}/*.la
207 %{_libdir}/*.a
208 %{_libdir}/pkgconfig/*
209 #%{_datadir}/aclocal/*
210 %{_includedir}/*.h
211
212 %files bin
213 %defattr(-, root, root)
214 %{_bindir}/ecore_config
215
216 %files con
217 %defattr(-, root, root)
218 %{_libdir}/libecore_con.so.*
219
220 %files config
221 %defattr(-, root, root)
222 %{_libdir}/libecore_config.so.*
223
224 %if %{with lib_ecore_directfb}
225 %files directfb
226 %defattr(-, root, root)
227 %{_libdir}/libecore_directfb.so.*
228 %endif
229
230 %files evas
231 %defattr(-, root, root)
232 %{_libdir}/libecore_evas.so.*
233
234 %if %{with lib_ecore_fb}
235 %files fb
236 %defattr(-, root, root)
237 %{_libdir}/libecore_fb.so.*
238 %endif
239
240 %files file
241 %defattr(-, root, root)
242 %{_libdir}/libecore_file.so.*
243
244 %if %{with lib_ecore_imf}
245 %files imf
246 %defattr(-, root, root)
247 %{_libdir}/libecore_imf*.so.*
248 %endif
249
250 %files ipc
251 %defattr(-, root, root)
252 %{_libdir}/libecore_ipc.so.*
253
254 %files job
255 %defattr(-, root, root)
256 %{_libdir}/libecore_job.so.*
257
258 %files txt
259 %defattr(-, root, root)
260 %{_libdir}/libecore_txt.so.*
261
262 %files x
263 %defattr(-, root, root)
264 %{_libdir}/libecore_x.so.*