File fswatch.spec of Package fswatch

#
# spec file for package fswatch
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define libfswatch 13
%global my_cc gcc-8
%global my_cxx g++-8

Name:           fswatch
Version:	1.18.3
Release:	0
License:	GPL-3.0+
Summary:	File change monitor
Url:		https://github.com/emcrisostomo/fswatch
Group:		System/Monitoring
Source:		%name-%version.tar.gz
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	libtool
BuildRequires:	makeinfo
BuildRequires:  gcc8
BuildRequires:  gcc8-c++

Requires:       libfswatch%{libfswatch} = %{version}-%{release}
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}

%description
Fswatch is a cross-platform file change monitor with multiple
backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos
File Events Notification, Linux inotify, Microsoft Windows and
a stat()-based backend.

%package devel
Summary: 	Development files for %name
Group:		Development/Libraries/C and C++
Requires: 	%name = %version
Requires:	glibc-devel

%description    devel
The %name-devel package contains libraries and header files for
developing applications that use %name.

%package -n libfswatch%{libfswatch}
Summary:        Shared code for the fswatch  program
Group:          System/Libraries

%description	-n libfswatch%{libfswatch}
This subpackage contains libraries that are part of fswatch.
 
%package doc
Summary:	Documentation files for %name
Requires:	%name = %version

%description doc
This package contains the documentation for using %name

%prep
%autosetup

%build
export CC=%{my_cc}
export CXX=%{my_cxx}
export CFLAGS="%{optflags} -fPIE"
export CXXFLAGS="%{optflags} -std=c++17 -fPIE"
export LDFLAGS="-pie"
%configure
%make_build

%check
%__make check

%install
%make_install
%__rm -rf %buildroot%_datadir/doc
%find_lang %name

%post doc
%install_info --info-dir=%_infodir %_infodir/%name.info.gz
%preun doc
%install_info_delete --info-dir=%_infodir %_infodir/%name.info.gz

%post -n libfswatch%{libfswatch} -p /sbin/ldconfig
%postun -n libfswatch%{libfswatch} -p /sbin/ldconfig

%files -f %name.lang
%defattr(-,root,root)
%_bindir/%name

%files devel
%defattr(-,root,root)
%dir %_includedir/libfswatch
%_includedir/libfswatch/*
%_libdir/libfswatch.so
%_libdir/libfswatch.a
%_libdir/libfswatch.la
%_libdir/pkgconfig/libfswatch.pc

%files -n libfswatch%{libfswatch} 
%defattr(-,root,root)
%doc AUTHORS.libfswatch NEWS.libfswatch README.libfswatch.md
%_libdir/libfswatch.so.%{libfswatch}*

%files doc
%defattr(-,root,root)
%doc AUTHORS ChangeLog CONTRIBUTING.md COPYING NEWS README.md README.linux
%_mandir/man7/%name.7.gz
%_infodir/%name.info.gz

%changelog
* Mon Apr 28 2025 Simone Sclavi <darkhado@gmail.com>  1.18.3
- 1.18.3 release 

* Thu Jul 15 2021 Simone Sclavi <darkhado@gmail.com>  1.16.0
- 1.16.0 release

* Tue Oct 13 2020 Simone Sclavi <darkhado@gmail.com>  1.15.0
- 1.15.0 release

* Tue Jun 19 2018 Simone Sclavi <darkhado@gmail.com>  1.14.0
- 1.14.0 release

* Tue Jun 19 2018 Simone Sclavi <darkhado@gmail.com>  1.11.3
- 1.11.3 release

* Tue Jan 09 2018 Simone Sclavi <darkhado@gmail.com>  1.11.2
- 1.11.2 release

* Mon Apr 10 2017 Simone Sclavi <darkhado@gmail.com>  1.9.3
- Initial build
openSUSE Build Service is sponsored by