Use pkgconfig with BuildRequires

Enable FLAC and Vorbis extractors. Preserve timestamps during install.

https://fedoraproject.org/wiki/Packaging:PkgConfigBuildRequires
This commit is contained in:
David King 2014-09-24 18:54:23 +01:00
parent 47776a4241
commit cae9b5cc38

View File

@ -12,70 +12,70 @@
%global with_thunderbird 1 %global with_thunderbird 1
%endif %endif
Summary: Desktop-neutral search tool and indexer Name: tracker
Name: tracker Version: 1.2.2
Version: 1.2.2 Release: 2%{?dist}
Release: 1%{?dist} Summary: Desktop-neutral search tool and indexer
License: GPLv2+
Group: Applications/System Group: Applications/System
URL: https://wiki.gnome.org/Projects/Tracker License: GPLv2+
Source0: http://download.gnome.org/sources/tracker/1.2/%{name}-%{version}.tar.xz URL: https://wiki.gnome.org/Projects/Tracker
Source0: https://download.gnome.org/sources/%{name}/1.2/%{name}-%{version}.tar.xz
# only autostart in Gnome, see also # only autostart in Gnome, see also
# https://bugzilla.redhat.com/show_bug.cgi?id=771601 # https://bugzilla.redhat.com/show_bug.cgi?id=771601
Patch1: tracker-0.15-onlyshowin.patch Patch1: tracker-0.15-onlyshowin.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=712142 # https://bugzilla.gnome.org/show_bug.cgi?id=712142
Patch3: 0001-Bump-the-minimum-memory-requirement-to-768M.patch Patch3: 0001-Bump-the-minimum-memory-requirement-to-768M.patch
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
%if 0%{?with_enca} BuildRequires: firefox
BuildRequires: enca-devel BuildRequires: giflib-devel
%endif BuildRequires: graphviz
BuildRequires: exempi-devel BuildRequires: gtk-doc
BuildRequires: firefox BuildRequires: intltool
BuildRequires: flac-devel BuildRequires: libjpeg-devel
BuildRequires: gdk-pixbuf2-devel BuildRequires: libtiff-devel
BuildRequires: giflib-devel
BuildRequires: gobject-introspection-devel
BuildRequires: graphviz
BuildRequires: gstreamer1-devel
BuildRequires: gstreamer1-plugins-base-devel
BuildRequires: gtk-doc
BuildRequires: gtk3-devel
BuildRequires: gupnp-dlna-devel
BuildRequires: intltool
%if 0%{?with_libcue}
BuildRequires: libcue-devel
%endif
BuildRequires: libexif-devel
BuildRequires: libgee-devel
BuildRequires: libgsf-devel
BuildRequires: libgxps-devel
BuildRequires: libicu-devel
BuildRequires: libiptcdata-devel
BuildRequires: libjpeg-devel
BuildRequires: libmediaart-devel
BuildRequires: libosinfo-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libuuid-devel
BuildRequires: libvorbis-devel
BuildRequires: libxml2-devel
%if 0%{?with_nautilus}
BuildRequires: nautilus-devel
%endif
BuildRequires: NetworkManager-glib-devel
BuildRequires: poppler-glib-devel
BuildRequires: rest-devel
BuildRequires: sqlite-devel
BuildRequires: taglib-devel
%if 0%{?with_thunderbird} %if 0%{?with_thunderbird}
BuildRequires: thunderbird BuildRequires: thunderbird
%endif %endif
BuildRequires: totem-pl-parser-devel BuildRequires: vala-devel
BuildRequires: upower-devel %if 0%{?with_enca}
BuildRequires: vala-devel BuildRequires: pkgconfig(enca)
%endif
BuildRequires: pkgconfig(exempi-2.0)
BuildRequires: pkgconfig(flac)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-pbutils-1.0)
BuildRequires: pkgconfig(gstreamer-tag-1.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(icu-uc)
%if 0%{?with_libcue}
BuildRequires: pkgconfig(libcue)
%endif
BuildRequires: pkgconfig(libexif)
BuildRequires: pkgconfig(gee-0.8)
BuildRequires: pkgconfig(libgsf-1)
BuildRequires: pkgconfig(libgxps)
BuildRequires: pkgconfig(libiptcdata)
%if 0%{?with_nautilus}
BuildRequires: pkgconfig(libnautilus-extension)
%endif
BuildRequires: pkgconfig(libnm-glib)
BuildRequires: pkgconfig(libosinfo-1.0)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libmediaart-1.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(poppler-glib)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(taglib_c)
BuildRequires: pkgconfig(totem-plparser)
BuildRequires: pkgconfig(upower-glib)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(vorbisfile)
Obsoletes: compat-tracker018 < 0.17.2-2 Obsoletes: compat-tracker018 < 0.17.2-2
Obsoletes: tracker-miner-flickr < 0.16.0 Obsoletes: tracker-miner-flickr < 0.16.0
@ -97,36 +97,36 @@ It has the ability to index, store, harvest metadata. retrieve and search
all types of files and other first class objects all types of files and other first class objects
%package devel %package devel
Summary: Headers for developing programs that will use %{name} Summary: Headers for developing programs that will use %{name}
Group: Development/Libraries Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel %description devel
This package contains the static libraries and header files needed for This package contains the static libraries and header files needed for
developing with tracker developing with tracker
%package needle %package needle
Summary: Tracker search tool Summary: Tracker search tool
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: paperbox <= 0.4.4 Obsoletes: paperbox <= 0.4.4
Obsoletes: tracker-ui-tools < 1.1.4 Obsoletes: tracker-ui-tools < 1.1.4
Obsoletes: tracker-search-tool <= 0.12.0 Obsoletes: tracker-search-tool <= 0.12.0
%description needle %description needle
Graphical frontend to tracker search. Graphical frontend to tracker search.
%package preferences %package preferences
Summary: Tracker preferences Summary: Tracker preferences
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: tracker-ui-tools < 1.1.4 Obsoletes: tracker-ui-tools < 1.1.4
%description preferences %description preferences
Graphical frontend to tracker configuration. Graphical frontend to tracker configuration.
%package firefox-plugin %package firefox-plugin
Summary: A simple bookmark exporter for Tracker Summary: A simple bookmark exporter for Tracker
Group: User Interface/Desktops Group: User Interface/Desktops
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description firefox-plugin %description firefox-plugin
This Firefox addon exports your bookmarks to Tracker, so that you can search This Firefox addon exports your bookmarks to Tracker, so that you can search
@ -134,9 +134,9 @@ for them for example using tracker-needle.
%if 0%{?with_nautilus} %if 0%{?with_nautilus}
%package nautilus-plugin %package nautilus-plugin
Summary: Tracker's nautilus plugin Summary: Tracker's nautilus plugin
Group: User Interface/Desktops Group: User Interface/Desktops
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description nautilus-plugin %description nautilus-plugin
Tracker's nautilus plugin, provides 'tagging' functionality. Ability to perform Tracker's nautilus plugin, provides 'tagging' functionality. Ability to perform
@ -145,22 +145,23 @@ search in nautilus using tracker is built-in directly in the nautilus package.
%if 0%{?with_thunderbird} %if 0%{?with_thunderbird}
%package thunderbird-plugin %package thunderbird-plugin
Summary: Thunderbird extension to export mails to Tracker Summary: Thunderbird extension to export mails to Tracker
Group: User Interface/Desktops Group: User Interface/Desktops
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%description thunderbird-plugin %description thunderbird-plugin
A simple Thunderbird extension to export mails to Tracker. A simple Thunderbird extension to export mails to Tracker.
%endif %endif
%package docs %package docs
Summary: Documentations for tracker Summary: Documentations for tracker
Group: Documentation Group: Documentation
BuildArch: noarch BuildArch: noarch
%description docs %description docs
This package contains the documentation for tracker This package contains the documentation for tracker
%prep %prep
%setup -q %setup -q
@ -171,30 +172,34 @@ This package contains the documentation for tracker
## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath ## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
%build %build
%configure --disable-static \ %configure --disable-static \
--enable-gtk-doc \ --enable-gtk-doc \
--enable-miner-evolution=no \ --enable-libflac \
--with-firefox-plugin-dir=%{_libdir}/firefox/extensions \ --enable-libvorbis \
--disable-mp3 \ --enable-miner-evolution=no \
--with-firefox-plugin-dir=%{_libdir}/firefox/extensions \
--disable-mp3 \
%if %{with_nautilus} %if %{with_nautilus}
--enable-nautilus-extension \ --enable-nautilus-extension \
%else %else
--disable-nautilus-extension \ --disable-nautilus-extension \
%endif %endif
%if 0%{?with_thunderbird} %if 0%{?with_thunderbird}
--with-thunderbird-plugin-dir=%{_libdir}/thunderbird/extensions \ --with-thunderbird-plugin-dir=%{_libdir}/thunderbird/extensions \
%endif %endif
--with-unicode-support=libicu \ --with-unicode-support=libicu \
--disable-functional-tests --disable-functional-tests
# Disable the functional tests for now, they use python bytecodes. # Disable the functional tests for now, they use python bytecodes.
make V=1 %{?_smp_mflags} make V=1 %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' %install
make DESTDIR=%{buildroot} INSTALL="install -p" install
find %{buildroot} -type f -name "*.la" -delete
rm -rf %{buildroot}%{_datadir}/tracker-tests rm -rf %{buildroot}%{_datadir}/tracker-tests
# Remove .so symlinks for private libraries -- no external users are supposed # Remove .so symlinks for private libraries -- no external users are supposed
@ -203,9 +208,11 @@ rm -f %{buildroot}%{_libdir}/tracker-1.0/*.so
%find_lang %{name} %find_lang %{name}
%check %check
desktop-file-validate %{buildroot}%{_datadir}/applications/tracker-*.desktop desktop-file-validate %{buildroot}%{_datadir}/applications/tracker-*.desktop
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%post preferences %post preferences
@ -229,6 +236,7 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%posttrans preferences %posttrans preferences
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files -f %{name}.lang %files -f %{name}.lang
%doc AUTHORS COPYING NEWS README %doc AUTHORS COPYING NEWS README
%{_bindir}/tracker* %{_bindir}/tracker*
@ -297,7 +305,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/gtk-doc/html/libtracker-sparql/ %{_datadir}/gtk-doc/html/libtracker-sparql/
%{_datadir}/gtk-doc/html/ontology/ %{_datadir}/gtk-doc/html/ontology/
%changelog %changelog
* Wed Sep 24 2014 David King <amigadave@amigadave.com> - 1.2.2-2
- Use pkgconfig for BuildRequires
- Preserve timestamps during install
- Enable FLAC and Vorbis extractors
* Wed Sep 24 2014 Kalev Lember <kalevlember@gmail.com> - 1.2.2-1 * Wed Sep 24 2014 Kalev Lember <kalevlember@gmail.com> - 1.2.2-1
- Update to 1.2.2 - Update to 1.2.2