1 |
%define shortname compizconfig |
2 |
%define name libcompizconfig |
3 |
%define version 0.9.5.94 |
4 |
%define rel 0 |
5 |
%define subrel 3 |
6 |
%define git bzr430 |
7 |
|
8 |
%define major 0 |
9 |
%define libname %mklibname %shortname %major |
10 |
%define libname_devel %mklibname -d %shortname |
11 |
|
12 |
%if %{git} |
13 |
%define srcname %{name}-%{git}.tar.xz |
14 |
%define distname %{name}-%{git} |
15 |
%define release %mkrel %{rel}.%{git} |
16 |
%else |
17 |
%define srcname %{name}-%{version}.tar.bz2 |
18 |
%define distname %{name}-%{version} |
19 |
%define release %mkrel %{rel} |
20 |
%endif |
21 |
|
22 |
%define _disable_ld_no_undefined 1 |
23 |
|
24 |
|
25 |
Summary: Backend configuration library from Compiz |
26 |
Name: %{name} |
27 |
Version: %{version} |
28 |
Release: %{release} |
29 |
# only ini backend is GPLv2+ |
30 |
License: LGPLv2+ and GPLv2+ |
31 |
Group: System/X11 |
32 |
URL: http://www.compiz.org/ |
33 |
|
34 |
# get source from launchpad |
35 |
# bzr branch lp:compiz-libcompizconfig |
36 |
# pushd compiz-libcompizconfig |
37 |
# bzr export --format=tar ../libcompizconfig-bzrcommit_id.tar |
38 |
# popd |
39 |
# xz -z -e libcompizconfig-bzrcommit_id.tar |
40 |
|
41 |
Source0: %{srcname} |
42 |
Patch0: libcompizconfig-0.9.5.92-mdv-fix-libdir.patch |
43 |
|
44 |
|
45 |
BuildRequires: cmake |
46 |
BuildRequires: libxml2-devel |
47 |
BuildRequires: compiz-devel >= %{version} |
48 |
BuildRequires: gettext-devel |
49 |
BuildRequires: intltool |
50 |
BuildRequires: protobuf-devel |
51 |
BuildRequires: boost-devel |
52 |
|
53 |
|
54 |
%description |
55 |
Backend configuration library from Compiz |
56 |
|
57 |
#---------------------------------------------------------------------------- |
58 |
|
59 |
%package -n %libname |
60 |
Summary: Backend configuration library from Compiz |
61 |
Group: System/X11 |
62 |
Provides: %{name} = %{version}-%{release} |
63 |
|
64 |
%description -n %libname |
65 |
Backend configuration library from Compiz |
66 |
|
67 |
%files -n %libname |
68 |
%{_libdir}/%{name}.so.%{major}* |
69 |
|
70 |
#---------------------------------------------------------------------------- |
71 |
|
72 |
%package common |
73 |
Summary: Common files for libcompizconfig |
74 |
Group: System/X11 |
75 |
Provides: %{shortname}-common = %{version}-%{release} |
76 |
Conflicts: %{libname} < 0.8.8 |
77 |
|
78 |
%description common |
79 |
Common files for libcompizconfig |
80 |
|
81 |
%files common |
82 |
%{_libdir}/compiz/libccp.so |
83 |
%{_libdir}/%{shortname}/backends/libini.so |
84 |
%{_datadir}/compiz/ccp.xml |
85 |
%{_datadir}/gconf/schemas/compiz-*.schemas |
86 |
%{_datadir}/glib-2.0/schemas/org.freedesktop.compiz.* |
87 |
|
88 |
#---------------------------------------------------------------------------- |
89 |
|
90 |
%package -n %libname_devel |
91 |
Summary: Development files for libcompizconfig |
92 |
Group: Development/X11 |
93 |
Requires: %{libname} = %{version}-%{release} |
94 |
Provides: %{name}-devel = %{version}-%{release} |
95 |
|
96 |
%description -n %libname_devel |
97 |
Development files for libcompizconfig |
98 |
|
99 |
%files -n %libname_devel |
100 |
%dir %{_includedir}/%{shortname} |
101 |
%{_includedir}/%{shortname}/ccs.h |
102 |
%{_includedir}/%{shortname}/ccs-backend.h |
103 |
%{_libdir}/%{name}.so |
104 |
%{_libdir}/pkgconfig/%{name}.pc |
105 |
%{_datadir}/compiz/cmake/*.cmake |
106 |
%{_datadir}/cmake/Modules/*.cmake |
107 |
|
108 |
#---------------------------------------------------------------------------- |
109 |
|
110 |
%prep |
111 |
%setup -q -n %{distname} |
112 |
%patch0 |
113 |
|
114 |
%build |
115 |
|
116 |
%cmake |
117 |
%make |
118 |
|
119 |
%install |
120 |
%__rm -rf %{buildroot} |
121 |
pushd build |
122 |
%makeinstall_std |
123 |
popd |
124 |
|
125 |
# This should work, but is buggy upstream: |
126 |
# make DESTDIR=%{buildroot} findcompizconfig_install |
127 |
# So we do this instead: |
128 |
mkdir -p %{buildroot}%{_datadir}/cmake/Modules |
129 |
cmake -E copy cmake/FindCompizConfig.cmake %{buildroot}%{_datadir}/cmake/Modules |
130 |
|
131 |
find %{buildroot} -name *.la -exec rm -f {} \; |
132 |
|
133 |
#---------------------------------------------------------------------------- |