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