1 |
%define major 20 |
2 |
%define cheesemajor 1 |
3 |
|
4 |
%define libname %mklibname %{name}-gtk %{major} |
5 |
%define develname %mklibname -d %{name}-gtk |
6 |
|
7 |
%define girmajor 3.0 |
8 |
%define girname %mklibname %{name}-gtk-gir %{girmajor} |
9 |
|
10 |
Name: cheese |
11 |
Version: 3.2.0 |
12 |
Release: %mkrel 1 |
13 |
Summary: A GNOME application for taking pictures and videos from a webcam |
14 |
License: GPLv2+ |
15 |
Group: Video |
16 |
URL: http://www.gnome.org/projects/cheese/ |
17 |
Source: http://download.gnome.org/sources/cheese/3.2/%{name}-%{version}.tar.xz |
18 |
BuildRequires: pkgconfig(cairo) >= 1.10.0 |
19 |
BuildRequires: pkgconfig(clutter-1.0) >= 1.6.1 |
20 |
BuildRequires: pkgconfig(clutter-gst-1.0) >= 1.0.0 |
21 |
BuildRequires: pkgconfig(clutter-gtk-1.0) >= 0.91.8 |
22 |
BuildRequires: pkgconfig(gdk-3.0) >= 2.99.4 |
23 |
BuildRequires: pkgconfig(gdk-pixbuf-2.0) |
24 |
BuildRequires: pkgconfig(gee-1.0) >= 0.6.0 |
25 |
BuildRequires: pkgconfig(gio-2.0) >= 2.28.0 |
26 |
BuildRequires: pkgconfig(glib-2.0) >= 2.28.0 |
27 |
BuildRequires: pkgconfig(gnome-desktop-3.0) >= 2.91.6 |
28 |
BuildRequires: pkgconfig(gnome-video-effects) |
29 |
BuildRequires: pkgconfig(gobject-2.0) >= 2.28.0 |
30 |
BuildRequires: pkgconfig(gstreamer-0.10) >= 0.10.32 |
31 |
BuildRequires: pkgconfig(gstreamer-plugins-base-0.10) >= 0.10.32 |
32 |
BuildRequires: pkgconfig(gtk+-3.0) >= 2.99.4 |
33 |
BuildRequires: pkgconfig(gudev-1.0) |
34 |
BuildRequires: pkgconfig(libcanberra-gtk3) >= 0.26 |
35 |
BuildRequires: pkgconfig(librsvg-2.0) >= 2.32.0 |
36 |
BuildRequires: pkgconfig(mx-1.0) |
37 |
BuildRequires: pkgconfig(pangocairo) >= 1.28.0 |
38 |
BuildRequires: pkgconfig(x11) |
39 |
BuildRequires: gobject-introspection-devel >= 0.6.7 |
40 |
BuildRequires: gtk-doc >= 1.14 |
41 |
BuildRequires: gnome-doc-utils >= 0.20 |
42 |
BuildRequires: libxtst-devel |
43 |
BuildRequires: intltool |
44 |
Requires: gnome-video-effects |
45 |
|
46 |
# TODO update features once added upstream |
47 |
%description |
48 |
Cheese is a Photobooth-inspired GNOME application for taking pictures and |
49 |
videos from a webcam. It also includes fancy graphical effects based on |
50 |
the gstreamer-backend. |
51 |
|
52 |
%package -n %{libname} |
53 |
Group: System/Libraries |
54 |
Summary: Shared library part of %{name} |
55 |
|
56 |
%description -n %{libname} |
57 |
Cheese is a Photobooth-inspired GNOME application for taking pictures and |
58 |
videos from a webcam. It also includes fancy graphical effects based on |
59 |
the gstreamer-backend. |
60 |
|
61 |
%package -n %{develname} |
62 |
Group: Development/C |
63 |
Summary: Developent files for %{name} |
64 |
Requires: %{libname} = %{version}-%{release} |
65 |
Provides: lib%{name}-gtk-devel = %{version}-%{release} |
66 |
Provides: lib%{name}-devel = %{version}-%{release} |
67 |
Provides: %{name}-devel = %{version}-%{release} |
68 |
|
69 |
%description -n %{develname} |
70 |
Cheese is a Photobooth-inspired GNOME application for taking pictures and |
71 |
videos from a webcam. It also includes fancy graphical effects based on |
72 |
the gstreamer-backend. |
73 |
|
74 |
%package -n %{girname} |
75 |
Summary: GObject Introspection interface description for %{name} |
76 |
Group: System/Libraries |
77 |
Provides: %{mklibname %{name}-gir %{girmajor}} = %{version}-%{release} |
78 |
Requires: %{libname} = %{version}-%{release} |
79 |
|
80 |
%description -n %{girname} |
81 |
GObject Introspection interface description for %{name}. |
82 |
|
83 |
%prep |
84 |
%setup -q |
85 |
|
86 |
%build |
87 |
%configure2_5x --disable-static |
88 |
%make |
89 |
|
90 |
%install |
91 |
rm -rf %{buildroot} |
92 |
%makeinstall_std |
93 |
|
94 |
#we don't want these |
95 |
find %{buildroot} -name '*.la' -exec rm -f {} ';' |
96 |
|
97 |
%find_lang %{name} --with-gnome --all-name |
98 |
|
99 |
%define launchers %{_sysconfdir}/dynamic/launchers/webcam |
100 |
|
101 |
# dynamic support |
102 |
mkdir -p %{buildroot}%{launchers} |
103 |
cat > %{buildroot}%{launchers}/%name.desktop << EOF |
104 |
[Desktop Entry] |
105 |
Name=Webcam Photobooth |
106 |
Comment=Cheese Webcam Photobooth using \$devicename |
107 |
TryExec=cheese |
108 |
Exec=cheese |
109 |
Terminal=false |
110 |
Icon=cheese |
111 |
Type=Application |
112 |
StartupNotify=true |
113 |
EOF |
114 |
|
115 |
%post |
116 |
update-alternatives --install %{launchers}/kde.desktop webcam.kde.dynamic %{launchers}/%name.desktop 60 |
117 |
update-alternatives --install %{launchers}/gnome.desktop webcam.gnome.dynamic %{launchers}/%name.desktop 60 |
118 |
|
119 |
%postun |
120 |
if [ "$1" = "0" ]; then |
121 |
update-alternatives --remove webcam.kde.dynamic %{launchers}/%name.desktop |
122 |
update-alternatives --remove webcam.gnome.dynamic %{launchers}/%name.desktop |
123 |
fi |
124 |
|
125 |
%files -f %{name}.lang |
126 |
%defattr(-,root,root) |
127 |
%config(noreplace) %{launchers}/*.desktop |
128 |
%{_bindir}/* |
129 |
%{_datadir}/%{name} |
130 |
%{_datadir}/icons/hicolor/*/apps/* |
131 |
%{_datadir}/applications/* |
132 |
%{_datadir}/glib-2.0/schemas/org.gnome.Cheese.gschema.xml |
133 |
|
134 |
%files -n %{libname} |
135 |
%defattr(-,root,root) |
136 |
%{_libdir}/lib%{name}-gtk.so.%{major}* |
137 |
%{_libdir}/lib%{name}.so.%{cheesemajor}* |
138 |
|
139 |
%files -n %{girname} |
140 |
%defattr(-,root,root) |
141 |
%{_libdir}/girepository-1.0/Cheese-%{girmajor}.typelib |
142 |
|
143 |
%files -n %{develname} |
144 |
%defattr(-,root,root) |
145 |
%{_includedir}/%{name} |
146 |
%{_libdir}/lib%{name}-gtk.so |
147 |
%{_libdir}/lib%{name}.so |
148 |
%{_libdir}/pkgconfig/%{name}.pc |
149 |
%{_libdir}/pkgconfig/%{name}-gtk.pc |
150 |
%{_datadir}/gtk-doc/html/%{name}/ |
151 |
%{_datadir}/gir-1.0/Cheese-%{girmajor}.gir |