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