]>
Commit | Line | Data |
---|---|---|
7d8a96bb ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
4 | ||
5 | Summary: Application matching framework | |
6 | Name: bamf | |
7 | Version: 0.2.104 | |
8 | Release: 1 | |
9 | # Library bits are LGPLv2 or LGPLv3 (but not open-ended LGPLv2+); | |
10 | # non-lib bits are GPLv3. | |
11 | # pbrobinson points out that three files in the lib are actually | |
12 | # marked GPL in headers, making library GPL, though we think this | |
13 | # may not be upstream's intention. For now, marking library as | |
14 | # GPL. | |
15 | # License: LGPLv2 or LGPLv3 | |
16 | License: GPL v2 or GPL v3 | |
17 | Group: Libraries | |
18 | URL: https://launchpad.net/bamf | |
19 | Source0: http://launchpad.net/bamf/0.2/%{version}/+download/%{name}-%{version}.tar.gz | |
20 | # Source0-md5: 4271cd5979483f7e3a9bffc42fed6383 | |
21 | BuildRequires: dbus-glib-devel | |
22 | BuildRequires: gobject-introspection-devel | |
23 | BuildRequires: gtk+2-devel | |
24 | BuildRequires: gtk+3-devel | |
25 | BuildRequires: gtk-doc | |
26 | BuildRequires: libgtop-devel | |
27 | BuildRequires: libwnck-devel | |
28 | BuildRequires: libwnck2-devel | |
571b41fd | 29 | BuildRequires: pkgconfig |
7d8a96bb ER |
30 | BuildRequires: vala |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | BAMF removes the headache of applications matching into a simple DBus | |
35 | daemon and C wrapper library. Currently features application matching | |
36 | at amazing levels of accuracy (covering nearly every corner case). | |
37 | This package contains the bamf library built against GTK+ 2. | |
38 | ||
39 | %package devel | |
40 | Summary: Development files for %{name} | |
41 | License: GPL v2 or GPL v3 | |
42 | Group: Development/Libraries | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | ||
45 | %description devel | |
46 | The %{name}-devel package contains libraries and header files for | |
47 | developing applications that use %{name}. | |
48 | ||
49 | %package daemon | |
50 | Summary: Application matching framework | |
51 | License: GPL v3 | |
52 | Group: Libraries | |
53 | ||
54 | %description daemon | |
55 | BAMF removes the headache of applications matching into a simple DBus | |
56 | daemon and C wrapper library. Currently features application matching | |
57 | at amazing levels of accuracy (covering nearly every corner case). | |
58 | This package contains the bamf daemon and supporting data. | |
59 | ||
60 | %package -n %{name}3 | |
61 | Summary: Application matching framework (GTK+ 3 build) | |
62 | ||
63 | %description -n %{name}3 | |
64 | BAMF removes the headache of applications matching into a simple DBus | |
65 | daemon and C wrapper library. Currently features application matching | |
66 | at amazing levels of accuracy (covering nearly every corner case). | |
67 | This package contains the bamf library built against GTK+ 3. | |
68 | ||
69 | %package -n %{name}3-devel | |
70 | Summary: Development files for %{name} (GTK+ 3 build) | |
71 | License: GPL v2 or GPL v3 | |
72 | Group: Development/Libraries | |
73 | Requires: %{name}3 = %{version}-%{release} | |
74 | ||
75 | %description -n %{name}3-devel | |
76 | The %{name}3-devel package contains libraries and header files for | |
77 | developing applications that use %{name} (GTK+ 3 build). | |
78 | ||
79 | %package apidocs | |
80 | Summary: %{name} API documentation | |
81 | Summary(pl.UTF-8): Dokumentacja API biblioteki %{name} | |
82 | Group: Documentation | |
83 | ||
84 | %description apidocs | |
85 | API and internal documentation for %{name} library. | |
86 | ||
87 | %prep | |
88 | %setup -q | |
89 | ||
90 | %build | |
91 | # ../.././src/bamf-legacy-window.c: In function 'bamf_legacy_window_get_class_name': | |
92 | # ../.././src/bamf-legacy-window.c:144:3: error: 'wnck_class_group_get_res_class' is deprecated (declared at /usr/include/libwnck-3.0/libwnck/class-group.h:89): Use 'wnck_class_group_get_id' instead [-Werror=deprecated-declarations] | |
93 | CFLAGS="%{rpmcflags} -Wno-error=deprecated-declarations" | |
94 | ||
95 | install -d build-gtk3 build-gtk2 | |
96 | cd build-gtk2 | |
97 | ../%configure \ | |
98 | --disable-static \ | |
99 | --with-gtk=2 \ | |
100 | --with-html-dir=%{_gtkdocdir} \ | |
101 | --enable-gtk-doc | |
102 | %{__make} | |
103 | ||
104 | cd ../build-gtk3 | |
105 | ../%configure \ | |
106 | --disable-static \ | |
107 | --with-gtk=3 \ | |
108 | ||
109 | %{__make} | |
110 | ||
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | %{__make} install -C build-gtk2 \ | |
114 | DESTDIR=$RPM_BUILD_ROOT | |
115 | %{__make} install -C build-gtk3 \ | |
116 | DESTDIR=$RPM_BUILD_ROOT | |
117 | ||
118 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbamf.la | |
119 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbamf3.la | |
120 | ||
121 | #find $RPM_BUILD_ROOT -regex ".*\.la$" | xargs rm -f -- | |
122 | ||
123 | %clean | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
126 | %post -p /sbin/ldconfig | |
127 | %postun -p /sbin/ldconfig | |
128 | ||
129 | %post -n %{name}3 -p /sbin/ldconfig | |
130 | %postun -n %{name}3 -p /sbin/ldconfig | |
131 | ||
132 | %files | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_libdir}/libbamf.so.*.*.* | |
135 | %ghost %{_libdir}/libbamf.so.0 | |
136 | ||
137 | %files -n %{name}3 | |
138 | %defattr(644,root,root,755) | |
139 | %attr(755,root,root) %{_libdir}/libbamf3.so.*.*.* | |
140 | %ghost %{_libdir}/libbamf3.so.0 | |
141 | ||
142 | %files devel | |
143 | %defattr(644,root,root,755) | |
144 | %{_includedir}/libbamf | |
145 | %{_libdir}/libbamf.so | |
146 | %{_pkgconfigdir}/libbamf.pc | |
147 | # Installation of these was disabled in the 0.2.72 release commit, | |
148 | # with no explanation - http://bazaar.launchpad.net/~unity-team/bamf/trunk/revision/374 | |
149 | #%{_libdir}/girepository-1.0/Bamf*.typelib | |
150 | #%{_datadir}/gir-1.0/Bamf*.gir | |
151 | #%{_datadir}/vala/vapi/Bamf*.vapi | |
152 | ||
153 | %files -n %{name}3-devel | |
154 | %defattr(644,root,root,755) | |
155 | %{_includedir}/libbamf3 | |
156 | %{_libdir}/libbamf3.so | |
157 | %{_pkgconfigdir}/libbamf3.pc | |
158 | ||
159 | %files daemon | |
160 | %defattr(644,root,root,755) | |
161 | %attr(755,root,root) %{_libdir}/bamfdaemon | |
162 | %{_datadir}/dbus-1/services/org.ayatana.bamf.service | |
163 | ||
164 | %if %{with apidocs} | |
165 | %files apidocs | |
166 | %defattr(644,root,root,755) | |
167 | %{_gtkdocdir}/libbamf | |
168 | %endif |