# trim changelog included in binary rpms %global _changelog_trimtime %(date +%s -d "1 year ago") Name: gamin Version: 0.1.10 Release: 40%{?dist} Summary: Library providing the FAM File Alteration Monitor API License: LGPL-2.0-only URL: http://www.gnome.org/~veillard/gamin/ #some of the files (server/inotify-kernel.c) are GPLv2 #so https://fedoraproject.org/wiki/Licensing#GPL_Compatibility_Matrix #says the whole is GPLv2 #License: GPLv2 Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.1/%{name}-%{version}.tar.bz2 # sample config file Source1: gaminrc BuildRequires: gcc glib2-devel BuildRequires: automake autoconf libtool # This fix addresses an issue with ARM, where the configuration triplet # happens to be armv5tel-redhat-linux-gnueabi instead of armv5tel-redhat-linux-gnu. # The patch declares HAVE_LINUX in case of linux-gnueabi as well. # Patch by Kedar Sovani Patch1: gamin-0.1.10-gnueabi.patch # Don't try to build with -DG_DISABLE_DEPRECATED - glib has moved on Patch2: gamin-manape.patch # upstream fixes Patch4: 0001-Poll-files-on-nfs4.patch Patch5: 0002-Fix-compilation-of-recent-glib-removing-G_CONST_RETU.patch # gam_server deadlocks, leading to all KDE applications hanging at start # https://bugzilla.redhat.com/show_bug.cgi?id=786170 # https://bugzilla.gnome.org/show_bug.cgi?id=667120 Patch7: 0004-fix-possible-server-deadlock-in-ih_sub_cancel.patch %description This C library provides an API and ABI compatible file alteration monitor mechanism compatible with FAM but not dependent on a system wide daemon. %package devel Summary: Libraries, includes, etc. to embed the Gamin library Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This C library provides an API and ABI compatible file alteration monitor mechanism compatible with FAM but not dependent on a system wide daemon. %package doc Summary: Documentation for %{name} Buildarch: noarch %description doc This C library provides an API and ABI compatible file alteration monitor mechanism compatible with FAM but not dependent on a system wide daemon. %prep %setup -q %patch -P 1 -p1 -b .gnueabi %patch -P 2 -p1 -b .manape %patch -P 4 -p1 -b .nfs4 %patch -P 5 -p1 -b .const %patch -P 7 -p1 -b .double-lock # missing includes sed -i -e 's|\(#define __GAM_SERVER_H__\) 1|\1|g' server/gam_server.h sed -i -e 's|\(#define __GAM_EXCLUDES_H__\) 1|\1|g' server/gam_excludes.h sed -i -e 's|\(#include "gam_pidname.h"\)|\1\n#include "gam_excludes.h"|g' server/gam_listener.c sed -i -e 's|\(#include "gam_error.h"\)|\1\n#include "gam_server.h"|g' server/gam_node.c sed -i -e 's|\(#include "gam_eq.h"\)|\1\n#include "gam_excludes.h"|g' server/gam_connection.c sed -i -e 's|\(#include "gam_inotify.h"\)|\1\n#include "gam_poll_basic.h"|g' server/gam_inotify.c sed -i -e 's|#include "gam_poll_generic.h"|#include "gam_poll_basic.h"|g' server/gam_server.c set +x for f in `find . -type f -regextype posix-extended -regex '.*\.(c|cc|h|hh|scm|py|pl|inx|tcl|txt)$'`; do sed -i.bak "s/\t/ /g" $f touch -r ${f}.bak $f rm ${f}.bak echo "$f" done set -x # update FSF address... damn, those guys move around a lot # ... anyways, better make sure they get their mail %global oa1 675 Mass Ave, Cambridge, MA 02139, USA %global oa2 59 Temple Place, Suite 330, Boston, MA\\s+02111(\\-1307)?\\s+USA %global an 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA %global re_oa %{oa1}|%{oa2} set +x echo "Updating FSF address:" for f in `find . -type f -regextype posix-extended -regex '.*\.(c|cc|h|hh|scm|py|pl|inx|tcl|txt)$'`; do if grep -zqP "%{re_oa}" $f; then perl -0777 -i -pe 's/%{re_oa}/%{an}/g' $f echo "$f" fi done set -x perl -0777 -i -pe 's|(FALSE;\n\s+if \(!eq\)\n\s+return)|$1 done_work|g' server/gam_eq.c #perl -0777 -i -pe 's|\\(\\s+if (\\!eq)\\n\\s+return\\)|$1 done_work|g' server/gam_eq.c # recode docs into UTF-8 for i in ChangeLog NEWS ; do iconv -f iso-8859-1 -t utf-8 < $i > XXX touch -r $i XXX mv XXX $i done # https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython # replace "/usr/bin/env python" with "/usr/bin/python2" for i in `find -name '*.py'`; do sed -i.bak "s|^#!/usr/bin/env python|#!%{__python2}|g" $i touch -r ${i}.bak $i rm ${i}.bak done %build autoreconf -vif %configure --disable-static make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} INSTALL="install -p" install -D -p -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/gaminrc touch %{buildroot}%{_sysconfdir}/%{name}/mandatory_gaminrc rm -fv %{buildroot}%{_libdir}/lib*.la # gamin server links this, it gets installed even in --disable-static mode, # but continue to omit from packaging as has been done for a long time -- rex rm -fv %{buildroot}%{_libdir}/libgamin_shared.a # move some of these files into documentation mkdir -p %{buildroot}%{_datadir}/%{name} cp doc/*.{html,gif,xsl} %{buildroot}%{_datadir}/%{name}/ %check ## 'make check' isn't working well at all in mock yet, needs work. #make check ||: %ldconfig_scriptlets %files %license COPYING %doc AUTHORS ChangeLog NEWS README %dir %{_sysconfdir}/%{name}/ %config(noreplace) %{_sysconfdir}/%{name}/gaminrc %config(noreplace) %{_sysconfdir}/%{name}/mandatory_gaminrc %{_libdir}/libfam.so.0* %{_libdir}/libgamin-1.so.0* %{_libexecdir}/gam_server %files devel %{_libdir}/libfam.so %{_libdir}/libgamin-1.so %{_includedir}/fam.h %{_libdir}/pkgconfig/%{name}.pc %doc TODO %files doc %{_datadir}/%{name} %doc doc/*.txt %changelog * Mon Aug 26 2024 pappy - 0.1.10-40 - Rebuilt for f40 * Sun Oct 29 2023 pappy - 0.1.10-39 - Rebuilt for f38 - drop %%changelog older than 10 years - add includes for missing function declarations - replace depricated Patch syntax * Thu Mar 16 2023 pappy - 0.1.10-38 - Rebuilt for f37 - doc package spun out * Mon Jul 27 2020 Fedora Release Engineering - 0.1.10-37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jan 28 2020 Fedora Release Engineering - 0.1.10-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jul 25 2019 Fedora Release Engineering - 0.1.10-35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sun Mar 17 2019 Miro Hrončok - 0.1.10-34 - Subpackage python2-gamin has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal * Thu Jan 31 2019 Fedora Release Engineering - 0.1.10-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Jul 21 2018 Peter Robinson 0.1.10-32 - Fix FTBFS, minor spec cleanups * Fri Jul 13 2018 Fedora Release Engineering - 0.1.10-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 0.1.10-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek - 0.1.10-29 - Add Provides for the old name without %%_isa * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.1.10-28 - Python 2 binary package renamed to python2-gamin See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Wed Aug 02 2017 Fedora Release Engineering - 0.1.10-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 0.1.10-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 0.1.10-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Fri Sep 23 2016 Rex Dieter - 0.1.10-24 - ship sample /etc/gamin/gaminrc, /etc/gamin/mandatory_gaminrc - s|/usr/bin/python|/usr/bin/python2| * Tue Jul 19 2016 Fedora Release Engineering - 0.1.10-23 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Mon Feb 22 2016 Rex Dieter - 0.1.10-22 - %%check: disable 'make check', needs work - %%build: --disable-static, drop rpath hacks - %%install: cleaner .la/.a omission * Mon Feb 22 2016 Rex Dieter - 0.1.10-21 - pull in slightly different upstream fix for deadlocks (gnome#667230) - cosmetics: use %%license, tighten subpkg deps - -python: cleanup, Provides: python(2)-gamin - %%check: make check (non-fatal for now) - %%files: track sonames explicitly * Wed Feb 03 2016 Fedora Release Engineering - 0.1.10-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Nov 4 2015 Peter Robinson 0.1.10-19 - Minor cleanups * Wed Jun 17 2015 Fedora Release Engineering - 0.1.10-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Aug 16 2014 Fedora Release Engineering - 0.1.10-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.1.10-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 0.1.10-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Feb 1 2013 Matthias Clasen - 0.1.10-14 - Make it work on nfs4 - Fix the build - Minor spec file cleanups