]> TLD Linux GIT Repositories - packages/libfm.git/blob - libfm.spec
- updated to 1.2.3, switched to gtk3
[packages/libfm.git] / libfm.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # disable gtk-doc
4
5 Summary:        Helper library for pcmanfm
6 Summary(pl.UTF-8):      Biblioteka pomocnicza do pcmanfm
7 Name:           libfm
8 Version:        1.2.3
9 Release:        1
10 License:        GPL v2+
11 Group:          Libraries
12 Source0:        http://downloads.sourceforge.net/pcmanfm/%{name}-%{version}.tar.xz
13 # Source0-md5:  3ff38200701658f7e80e25ed395d92dd
14 Patch1:         mate-desktop.patch
15 URL:            http://pcmanfm.sourceforge.net/
16 BuildRequires:  cairo-devel >= 1.8.0
17 BuildRequires:  dbus-glib-devel
18 BuildRequires:  gettext-tools
19 BuildRequires:  glib2-devel >= 1:2.27.0
20 BuildRequires:  gtk+3-devel >= 3.0.0
21 %{?with_apidocs:BuildRequires:  gtk-doc}
22 BuildRequires:  intltool >= 0.40.0
23 BuildRequires:  libexif-devel
24 BuildRequires:  menu-cache-devel
25 BuildRequires:  pango-devel >= 1.16.0
26 BuildRequires:  pkgconfig
27 BuildRequires:  tar >= 1:1.22
28 BuildRequires:  vala >= 0.13.0
29 BuildRequires:  xz
30 Obsoletes:      lxshortcut
31 Requires(post,postun):  /sbin/ldconfig
32 Requires(post,postun):  shared-mime-info
33 Requires:       glib2 >= 1:2.27.0
34 # in case someone want to split this package into smaller ones
35 Provides:       libfm-gtk
36 Provides:       lxshortcut
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Helper library for pcmanfm.
41
42 %description -l pl.UTF-8
43 Biblioteka pomocnicza dla pcmanfm
44
45 %package devel
46 Summary:        Header files and libraries for libfm development
47 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumentacja do libfm
48 Group:          Development/Libraries
49 Requires:       %{name} = %{epoch}:%{version}-%{release}
50 Provides:       libfm-gtk-devel
51
52 %description devel
53 This package contains the header files needed to develop programs that
54 use these libfm.
55
56 %description devel -l pl.UTF-8
57 Pakiet zawiera pliki nagłówkowe potrzebne do rozwoju oprogramowania
58 korzystającego z libfm.
59
60 %package static
61 Summary:        Static library for libfm development
62 Summary(pl.UTF-8):      Biblioteka statyczna do libfm
63 Group:          Development/Libraries
64 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
65
66 %description static
67 This package contains the header files and libraries needed to develop
68 programs that use these libfm.
69
70 %description static -l pl.UTF-8
71 Pakiet zawiera pliki nagłówkowe potrzebne do rozwoju oprogramowania
72 korzystającego z libfm.
73
74 %package apidocs
75 Summary:        LIBFM API documentation
76 Summary(pl.UTF-8):      Dokumentacja API LIBFM
77 Group:          Documentation
78 Requires:       gtk-doc-common
79
80 %description apidocs
81 LIBFM API documentation.
82
83 %description apidocs -l pl.UTF-8
84 Dokumentacja API LIBFM.
85
86 %prep
87 %setup -q
88 %patch1 -p1
89
90 %build
91 %configure \
92         --disable-silent-rules \
93         --enable-gtk-doc=%{!?with_apidocs:no}%{?with_apidocs:yes} \
94         %{?with_apidocs:--with-html-dir=%{_gtkdocdir}} \
95         --enable-exif \
96         --enable-udisks \
97         --with-gtk=3
98 %{__make}
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102 %{__make} install -j1 \
103         INSTALL_DATA="install -p -m 644" \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 # pkg-config present, so drop .la
107 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfm.la
108 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfm-extra.la
109 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfm-gtk3.la
110
111 %{__rm} -r $RPM_BUILD_ROOT%{_localedir}/tt_RU
112
113 %find_lang %{name}
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %post
119 /sbin/ldconfig
120 %update_mime_database
121
122 %postun
123 /sbin/ldconfig
124 %update_mime_database
125
126 %files -f %{name}.lang
127 %defattr(644,root,root,755)
128 %doc AUTHORS TODO
129 %attr(755,root,root) %{_bindir}/lxshortcut
130 %dir /etc/xdg/libfm
131 %config(noreplace) %verify(not md5 mtime size) /etc/xdg/libfm/libfm.conf
132 %attr(755,root,root) %{_libdir}/libfm.so.*.*.*
133 %attr(755,root,root) %ghost %{_libdir}/libfm.so.4
134 %attr(755,root,root) %{_libdir}/libfm-extra.so.*.*.*
135 %attr(755,root,root) %ghost %{_libdir}/libfm-extra.so.4
136 %{_datadir}/libfm
137 %{_datadir}/mime/packages/libfm.xml
138 %attr(755,root,root) %{_libdir}/libfm
139
140 # -gtk
141 #%config(noreplace) %verify(not md5 mtime size) /etc/xdg/libfm/pref-apps.conf
142 %attr(755,root,root) %{_bindir}/libfm-pref-apps
143 %attr(755,root,root) %{_libdir}/libfm-gtk3.so.*.*.*
144 %attr(755,root,root) %ghost %{_libdir}/libfm-gtk3.so.4
145 %{_desktopdir}/libfm-pref-apps.desktop
146 %{_desktopdir}/lxshortcut.desktop
147 %{_mandir}/man1/libfm-pref-apps.1*
148 %{_mandir}/man1/lxshortcut.1*
149
150 %files devel
151 %defattr(644,root,root,755)
152 %{_includedir}/libfm
153 %{_libdir}/libfm-extra.so
154 %{_libdir}/libfm-gtk3.so
155 %{_libdir}/libfm.so
156 %{_pkgconfigdir}/libfm-extra.pc
157 %{_pkgconfigdir}/libfm-gtk3.pc
158 %{_pkgconfigdir}/libfm.pc
159 %{_includedir}/libfm-1.0
160
161 %files static
162 %defattr(644,root,root,755)
163 %{_libdir}/libfm-extra.a
164 %{_libdir}/libfm-gtk3.a
165 %{_libdir}/libfm.a
166
167 %if %{with apidocs}
168 %files apidocs
169 %defattr(644,root,root,755)
170 %{_gtkdocdir}/libfm
171 %endif