]>
Commit | Line | Data |
---|---|---|
86a6883a JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library build | |
4 | # | |
5 | Summary: keybinder library for GTK+3 | |
6 | Summary(pl.UTF-8): Biblioteka keybinder dla GTK+3 | |
7 | Name: keybinder3 | |
2862399e | 8 | Version: 0.3.2 |
86a6883a JP |
9 | Release: 1 |
10 | License: GPL v2 | |
11 | Group: Libraries | |
2862399e JB |
12 | #Source0Download: https://github.com/kupferlauncher/keybinder/releases |
13 | Source0: https://github.com/kupferlauncher/keybinder/releases/download/keybinder-3.0-v%{version}/keybinder-3.0-%{version}.tar.gz | |
14 | # Source0-md5: 97260321fda721fce799174ea6ba10cf | |
34408fe2 | 15 | Patch0: %{name}-docs.patch |
2862399e | 16 | URL: https://github.com/kupferlauncher/keybinder/ |
86a6883a JP |
17 | BuildRequires: autoconf >= 2.62 |
18 | BuildRequires: automake >= 1:1.9.2 | |
19 | BuildRequires: gobject-introspection-devel >= 0.6.7 | |
86a6883a | 20 | BuildRequires: gtk-doc >= 1.14 |
2862399e | 21 | BuildRequires: gtk+3-devel >= 3.0 |
86a6883a JP |
22 | BuildRequires: libtool |
23 | BuildRequires: pkgconfig | |
24 | BuildRequires: xorg-lib-libX11-devel | |
25 | BuildRequires: xorg-lib-libXext-devel | |
26 | BuildRequires: xorg-lib-libXrender-devel | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | keybinder is a library for registering global keyboard shortcuts. | |
31 | Keybinder works with GTK-based applications using the X Window System. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | keybinder jest biblioteką umożliwiającą rejestrowanie globalnych | |
35 | skrótów klawiszowych. Działa z aplikacjami opartymi na GTK. | |
36 | ||
37 | %package devel | |
38 | Summary: Header files for keybinder3 library | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki keybinder3 | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
2862399e | 42 | Requires: gtk+3-devel >= 3.0 |
86a6883a JP |
43 | |
44 | %description devel | |
45 | Header files for keybinder3 library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki keybinder3. | |
49 | ||
50 | %package static | |
51 | Summary: Static keybinder3 library | |
52 | Summary(pl.UTF-8): Statyczna biblioteka keybinder3 | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static keybinder3 library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka keybinder3. | |
61 | ||
62 | %package doc | |
63 | Summary: HTML documentation for keybinder3 library | |
64 | Summary(pl.UTF-8): Dokumentacja w HTML biblioteki keybinder3 | |
65 | Group: Documentation | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | ||
68 | %description doc | |
69 | HTML documentation for keybinder3 library. | |
70 | ||
71 | %description devel -l pl.UTF-8 | |
72 | Dokumentacja w HTML biblioteki keybinder3. | |
73 | ||
74 | %prep | |
2862399e | 75 | %setup -q -n keybinder-3.0-%{version} |
34408fe2 | 76 | %patch0 -p1 |
86a6883a | 77 | |
2a012905 JP |
78 | grep -rl /usr/bin/env examples | xargs sed -i -e '1{ |
79 | s,^#!.*bin/env python,#!%{__python}, | |
80 | s,^#!.*bin/env lua,#!%{__lua}, | |
81 | }' | |
82 | ||
86a6883a JP |
83 | %build |
84 | %{__gtkdocize} | |
85 | %{__libtoolize} | |
86 | %{__aclocal} | |
87 | %{__autoconf} | |
88 | %{__automake} | |
89 | %configure \ | |
90 | --disable-silent-rules \ | |
91 | --enable-gtk-doc \ | |
92 | %{?with_static_libs:--enable-static} \ | |
93 | --with-html-dir=%{_gtkdocdir} | |
94 | ||
95 | %{__make} | |
96 | ||
97 | %install | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
100 | ||
101 | %{__make} install \ | |
102 | DESTDIR=$RPM_BUILD_ROOT | |
103 | ||
2862399e JB |
104 | # obsoleted by pkg-config |
105 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libkeybinder-3.0.la | |
106 | ||
86a6883a JP |
107 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
108 | ||
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %post -p /sbin/ldconfig | |
113 | %postun -p /sbin/ldconfig | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc AUTHORS NEWS README | |
86a6883a | 118 | %attr(755,root,root) %{_libdir}/libkeybinder-3.0.so.*.*.* |
2862399e | 119 | %attr(755,root,root) %ghost %{_libdir}/libkeybinder-3.0.so.0 |
86a6883a JP |
120 | %{_libdir}/girepository-1.0/Keybinder-3.0.typelib |
121 | ||
122 | %files devel | |
123 | %defattr(644,root,root,755) | |
124 | %attr(755,root,root) %{_libdir}/libkeybinder-3.0.so | |
86a6883a JP |
125 | %{_datadir}/gir-1.0/Keybinder-3.0.gir |
126 | %dir %{_includedir}/keybinder-3.0 | |
127 | %{_includedir}/keybinder-3.0/keybinder.h | |
128 | %{_pkgconfigdir}/keybinder-3.0.pc | |
129 | %{_examplesdir}/%{name}-%{version} | |
130 | ||
131 | %if %{with static_libs} | |
132 | %files static | |
133 | %defattr(644,root,root,755) | |
134 | %{_libdir}/libkeybinder-3.0.a | |
135 | %endif | |
136 | ||
137 | %files doc | |
138 | %defattr(644,root,root,755) | |
139 | %{_gtkdocdir}/keybinder-3.0 |