Search
SailfishOS Open Build Service
>
Projects
>
sailfishos
:
chum
:
testing
>
mlocate
> _service:tar_git:mlocate.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:mlocate.spec of Package mlocate
# # Do NOT Edit the Auto-generated Part! # Generated by: spectacle version 0.32 # Name: mlocate # >> macros # << macros %define legacy_version 0.26-13 %define sgid_group privileged %define dbloc %{_localstatedir}/cache %define dbname %{dbloc}/%{name}.db %define debug_build 0 Summary: a locate/updatedb implementation Version: 0.26+git5 Release: 0 Group: Applications/File License: GPLv2 URL: https://pagure.io/mlocate Source0: %{name}-%{version}.tar.gz Source1: %{name}-updatedb.conf Source2: %{name}-updatedb.service Source3: %{name}-updatedb.timer Source4: %{name}-updatedb-user.service Source5: %{name}-updatedb-user.timer Source100: mlocate.yaml Requires(post): %{_libexecdir}/manage-groups Requires(postun): %{_libexecdir}/manage-groups BuildRequires: glibc-devel BuildRequires: gettext-devel BuildRequires: autoconf BuildRequires: automake Provides: harbour-mlocate = %{version}-%{release} Obsoletes: harbour-mlocate <= %{legacy_version} %description mlocate is a locate/updatedb implementation. The 'm' stands for "merging": updatedb reuses the existing database to avoid rereading most of the file system, which makes updatedb faster and does not trash the system caches as much. The locate(1) utility is intended to be completely compatible to slocate. It also attempts to be compatible to GNU locate, when it does not conflict with slocate compatibility. NOTE: this package installs only the programs. You may want to install either %{name}-user-service or %{name}-system-service to create the database and keep it up-to-date. If you are looking for a GUI application, try gmLocate: https://openrepos.net/content/sh6668/gmlocate %if "%{?vendor}" == "chum" PackageName: mlocate Type: console-application Categories: - Utility - FileTools Custom: Repo: https://pagure.io/mlocate.git PackagingRepo: https://gitlab.com/nephros/harbour-mlocate Screenshots: - https://github.com/nephros/sailfish-alpine/raw/obs/screenshot.png Url: Homepage: https://pagure.io/mlocate.git %endif %package service-user Summary: User updatedb timer for mlocate Group: System/Daemons BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires(post): systemd Provides: harbour-mlocate-systemd-user = %{version}-%{release} Obsoletes: harbour-mlocate-systemd-user <= %{legacy_version} %description service-user %{name} systemd timer and service users can enable which will index only their HOME and keep the database under ~/.cache This runs three times per day. After installing, you need to activate it by running: systemctl --user enable mlocate-updatedb-user.timer %if "%{?vendor}" == "chum" PackageName: mlocate user service files DeveloperName: nephros Type: console-application Categories: - Utility - FileTools %endif %package service-system Summary: System updatedb timer for mlocate Group: System/Daemons BuildArch: noarch Requires: %{name} = %{version}-%{release} Requires(post): systemd Provides: harbour-mlocate-systemd-system = %{version}-%{release} Obsoletes: harbour-mlocate-systemd-system <= %{legacy_version} %description service-system %{name} systemd timer and service which will keep the index up-to-date This runs weekly and updates the system-wide database. %if "%{?vendor}" == "chum" PackageName: mlocate system service files DeveloperName: nephros Type: console-application Categories: - Utility - FileTools %endif %prep %setup -q -n %{name}-%{version}/upstream # >> setup # << setup %build # >> build pre # see upstream/HACKING ../gnulib/gnulib-tool --import autoreconf -is # << build pre %configure --disable-static \ -q -C \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ --libdir=%{_libdir} \ --includedir=%{_includedir} \ --mandir=%{_mandir} \ --docdir=%{_docdir} \ --disable-nls \ --with-gnu-ld # >> build post make %{?_smp_mflags} groupname=%{sgid_group} dbfile=%{dbname} AR=/usr/bin/ar # << build post %install rm -rf %{buildroot} # >> install pre make install groupname=%{sgid_group} dbfile=%{dbname} DESTDIR=%{buildroot} # << install pre # >> install post %{__install} -p -D -m 644 %SOURCE1 %{buildroot}/%{_sysconfdir}/updatedb.conf %{__install} -p -D -m 644 %SOURCE2 %{buildroot}/%{_unitdir}/%{name}-updatedb.service %{__install} -p -D -m 644 %SOURCE3 %{buildroot}/%{_unitdir}/%{name}-updatedb.timer %{__install} -p -D -m 644 %SOURCE4 %{buildroot}/%{_userunitdir}/%{name}-updatedb-user.service %{__install} -p -D -m 644 %SOURCE5 %{buildroot}/%{_userunitdir}/%{name}-updatedb-user.timer # so we can ghost it: mkdir -p %{buildroot}%{dbloc} touch %{buildroot}%{dbname} rm -rf %{buildroot}/%{_mandir} # << install post %preun # >> preun %systemd_preun %{name}-updatedb.service %systemd_user_preun %{name}-updatedb-user.service # << preun %post # >> post # See https://github.com/sailfishos/sailfish-setup/blob/master/scripts/manage-groups.sh %{_libexecdir}/manage-groups add %{sgid_group} ||: %post service-system # SFOS < 4 fails with these macros %if %{sailfishos_version} < 40001 %if %{sailfishos_version} >= 30000 %systemd_post ||: %endif %else %systemd_post %{name}-updatedb.service ||: %systemd_postun %{name}-updatedb-user.service %systemd_postun %{name}-updatedb-user.timer %endif # historical reasons: remove legacy: systemctl --no-reload disable --now harbour-mlocate-updatedb.service ||: systemctl --no-reload disable --now harbour-mlocate-updatedb.timer ||: # historical reasons: gmLocate expects this: ln -s %{dbname} %{dbloc}/harbour-mlocate.db ||: %post service-user # SFOS < 4 fails with these macros %if %{sailfishos_version} < 40001 %if %{sailfishos_version} >= 30000 : %endif %else %systemd_user_post %{name}-updatedb-user.service ||: %endif # historical reasons: remove legacy: systemctl --no-reload --user --global disable harbour-mlocate-updatedb-user.service ||: systemctl --no-reload --user --global disable harbour-mlocate-updatedb-user.timer ||: # << post %postun # >> postun # See https://github.com/sailfishos/sailfish-setup/blob/master/scripts/manage-groups.sh if [ "$1" -eq 0 ]; then %{_libexecdir}/manage-groups remove %{sgid_group} ||: fi %postun service-system %systemd_postun %{name}-updatedb.service %systemd_postun %{name}-updatedb.timer if [ $1 = 0 ]; then #Do stuff specific to uninstalls rm -f %{dbname} ||: rm -f %{dbloc}/harbour-mlocate.db ||: else if [ $1 = 1 ]; then #Do stuff specific to upgrades echo "this is an upgrade..." if [ -e %{dbname} ]; then /bin/chgrp -cv %{sgid_group} %{dbname} ||: fi fi fi systemctl daemon-reload >/dev/null 2>&1 ||: %postun service-user %systemd_user_postun %{name}-updatedb-user.service %systemd_user_postun %{name}-updatedb-user.timer # << postun %files %defattr(-,root,root,-) %config %{_sysconfdir}/updatedb.conf %{_bindir}/updatedb %attr(2711,root,%{sgid_group}) %{_bindir}/locate %ghost %{dbname} # >> files # << files %files service-user %defattr(-,root,root,-) %{_userunitdir}/%{name}-updatedb-user.service %{_userunitdir}/%{name}-updatedb-user.timer # >> files service-user # << files service-user %files service-system %defattr(-,root,root,-) %{_unitdir}/%{name}-updatedb.service %{_unitdir}/%{name}-updatedb.timer # >> files service-system # << files service-system