From bc2ae697745f5ebd2642e71cc03cd271bbc8ee5a Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Wed, 1 Jun 2016 14:56:49 +0200 Subject: [PATCH] add bootstrap support (need to build menu-cache in epel7 branch) --- libfm.spec | 48 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/libfm.spec b/libfm.spec index c71fab6..4be57b7 100644 --- a/libfm.spec +++ b/libfm.spec @@ -2,13 +2,14 @@ # Upstream git: # git://pcmanfm.git.sourceforge.net/gitroot/pcmanfm/libfm - +# add bootstrap, need to build menu-cache in epel7 +%global bootstrap 0 %global mainver 1.2.4 -%undefine prever +%undefine prever %global prerpmver %(echo "%{?prever}" | sed -e 's|-||g') %global usegit 0 -%global mainrel 1 +%global mainrel 2 %global githash 47d0c1dd7d59c83188f11bfd6aef4a855f4f5c39 %global shorthash %(TMP=%githash ; echo ${TMP:0:10}) @@ -35,7 +36,7 @@ URL: http://pcmanfm.sourceforge.net/ Source0: https://github.com/lxde/libfm/archive/%{githash}/%{name}-%{version}-D%{gitdate_num}git%{githash}.tar.gz %else Source0: http://downloads.sourceforge.net/pcmanfm/%{name}-%{mainver}%{?prever}.tar.xz -Source1: https://raw.githubusercontent.com/lxde/libfm/master/autogen.sh +Source1: https://raw.githubusercontent.com/lxde/libfm/master/autogen.sh %endif # Fedora specific patches # Firefox uses firefox.desktop for desktop name, drop @@ -48,7 +49,10 @@ BuildRequires: gtk3-devel %if 0%{?fedora} >= 22 BuildRequires: gtk2-devel %endif + +%if ! 0%{?bootstrap} BuildRequires: menu-cache-devel >= 0.3.2 +%endif BuildRequires: gettext BuildRequires: intltool @@ -63,7 +67,7 @@ BuildRequires: vala # Patch1000 needs the below anyway BuildRequires: automake -BuildRequires: libtool +BuildRequires: libtool %if 0%{?build_doc} < 1 Obsoletes: %{name}-devel-docs < 0.1.15 @@ -136,7 +140,7 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. -%package gtk-devel-common +%package gtk-devel-common Summary: Common Development files for %{name}-gtk Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} @@ -205,6 +209,9 @@ for ver in \ %{nil} do %configure \ +%if 0%{?bootstrap} + --with-extra-only \ +%endif --enable-gtk-doc \ --enable-udisks \ --with-gtk=${ver} \ @@ -229,8 +236,10 @@ cp -a INSTDIR-gtk3/* $RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libfm-gtk.pc find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +%if ! 0%{?bootstrap} desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop %find_lang %{name} +%endif echo '%%defattr(-,root,root,-)' > base-header.files echo '%%defattr(-,root,root,-)' > gtk-header.files @@ -300,30 +309,34 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %post gtk -p /sbin/ldconfig %postun gtk -p /sbin/ldconfig -%if %{?fedora} >= 22 +%if 0%{?fedora} >= 22 %post gtk2 -p /sbin/ldconfig %postun gtk2 -p /sbin/ldconfig %endif +%if 0%{?bootstrap} +%files +%else %files -f %{name}.lang +%endif # FIXME: Add ChangeLog if not empty %doc AUTHORS %doc COPYING %doc NEWS %doc README +%if ! 0%{?bootstrap} %dir %{_sysconfdir}/xdg/libfm/ %config(noreplace) %{_sysconfdir}/xdg/libfm/libfm.conf - %{_datadir}/%{name}/ - %{_libdir}/%{name}.so.4* -%{_libdir}/%{name}-extra.so.4* %dir %{_libdir}/libfm %dir %{_libdir}/libfm/modules %{_libdir}/libfm/modules/vfs-*.so %{_datadir}/mime/packages/libfm.xml +%endif +%{_libdir}/%{name}-extra.so.4* - +%if ! 0%{?bootstrap} %files gtk %{_libdir}/%{name}-gtk3.so.4* %{_datadir}/libfm/ @@ -340,17 +353,20 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %{_bindir}/lxshortcut %{_datadir}/applications/libfm-pref-apps.desktop %{_datadir}/applications/lxshortcut.desktop - +%endif %files devel -f base-header.files %doc TODO %{_includedir}/libfm %dir %{_includedir}/libfm-1.0/ +%if ! 0%{?bootstrap} %{_libdir}/%{name}.so -%{_libdir}/%{name}-extra.so %{_libdir}/pkgconfig/libfm.pc +%endif +%{_libdir}/%{name}-extra.so %{_libdir}/pkgconfig/libfm-extra.pc +%if ! 0%{?bootstrap} %files gtk-devel-common -f gtk-header.files %{_includedir}/libfm-1.0/fm-gtk.h @@ -374,8 +390,12 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %dir %{_datadir}/gtk-doc/html %{_datadir}/gtk-doc/html/%{name} %endif +%endif %changelog +* Wed Jun 01 2016 Than Ngo - 1.2.4-2 +- add bootstrap support (need to build menu-cache in epel7 branch) + * Sun Feb 28 2016 Mamoru TASAKA - 1.2.4-1 - 1.2.4 @@ -487,7 +507,7 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : * Sun Nov 4 2012 Mamoru TASAKA - 1.1.0-1 - 1.1.0 -* Wed Sep 27 2012 Mamoru Tasaka - 1.0.1-1 +* Thu Sep 27 2012 Mamoru Tasaka - 1.0.1-1 - 1.0.1 * Wed Aug 15 2012 Mamoru Tasaka - 1.0-1