5ac5873a8804f324467582c5854912050f8c18b2
[profile/ivi/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
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 x
147 Summary: Ecore functions for dealing with the X Windows System
148 Group: Development/Libraries
149 Requires: %{name} = %{version}
150
151 %description x
152 Ecore functions for dealing with the X Windows System
153
154 %prep
155 %setup -q -n %{name}-%{version}
156
157 %build
158 CFLAGS="-I/usr/kerberos/include -I/usr/X11R6/include/X11/extensions"
159 LDFLAGS="-L/usr/kerberos/lib -L/usr/X11R6/%{_lib}"
160 export CFLAGS LDFLAGS
161 %{configure} --prefix=%{_prefix} \
162     %{?ac_with_lib_ecore_directfb} \
163     %{?ac_with_lib_ecore_fb} \
164     %{?ac_with_lib_ecore_imf} \
165     %{?ac_with_lib_ecore_sdl}
166
167 %{__make} %{?_smp_mflags} %{?mflags}
168
169 %install
170 %{__make} %{?mflags_install} DESTDIR=$RPM_BUILD_ROOT install
171
172 %post
173 /sbin/ldconfig || :
174
175 %postun
176 /sbin/ldconfig || :
177
178 %clean
179 test "x$RPM_BUILD_ROOT" != "x/" && rm -rf $RPM_BUILD_ROOT
180
181 %files
182 %defattr(-, root, root)
183 %doc AUTHORS COPYING* README*
184 %{_libdir}/libecore.so.*
185
186 %files devel
187 %defattr(-, root, root)
188 %doc doc/html
189 %{_libdir}/*.so
190 %{_libdir}/*.la
191 %{_libdir}/*.a
192 %{_libdir}/pkgconfig/*
193 #%{_datadir}/aclocal/*
194 %{_includedir}/*.h
195
196 %files bin
197 %defattr(-, root, root)
198 %{_bindir}/ecore_config
199
200 %files con
201 %defattr(-, root, root)
202 %{_libdir}/libecore_con.so.*
203
204 %files config
205 %defattr(-, root, root)
206 %{_libdir}/libecore_config.so.*
207
208 %if %{with lib_ecore_directfb}
209 %files directfb
210 %defattr(-, root, root)
211 %{_libdir}/libecore_directfb.so.*
212 %endif
213
214 %files evas
215 %defattr(-, root, root)
216 %{_libdir}/libecore_evas.so.*
217
218 %if %{with lib_ecore_fb}
219 %files fb
220 %defattr(-, root, root)
221 %{_libdir}/libecore_fb.so.*
222 %endif
223
224 %files file
225 %defattr(-, root, root)
226 %{_libdir}/libecore_file.so.*
227
228 %if %{with lib_ecore_imf}
229 %files imf
230 %defattr(-, root, root)
231 %{_libdir}/libecore_imf*.so.*
232 %endif
233
234 %files ipc
235 %defattr(-, root, root)
236 %{_libdir}/libecore_ipc.so.*
237
238 %files x
239 %defattr(-, root, root)
240 %{_libdir}/libecore_x.so.*