File inotify-tools.spec of Package inotify-tools

#
# spec file for package inotify-tools
#
# Copyright (c) 2013 SUSE LINUX Products 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 soname		0

Name:           inotify-tools
Version:        3.14
Release:        0.0
Summary:        Command Line Utilities for inotify
License:        GPL-2.0
Group:          System/Filesystems
Url:            https://github.com/rvoicilas/inotify-tools/wiki
Source:         %{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM inotify-tools-3.13-no-return-in-nonvoid-function.patch
Patch1:         inotify-tools-3.13-no-return-in-nonvoid-function.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  doxygen
BuildRequires:  gcc
BuildRequires:  gettext
BuildRequires:  gettext-devel
BuildRequires:  glibc-devel
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  make
Requires:       libinotifytools%{soname} = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
inotify-tools is a set of command line utilities for the Linux inotify
filesystem change notification system. It currently consists of only one
utility, "inotifywait", which is used to wait for changes to a file from
a shell script.

%package -n libinotifytools%{soname}
Summary:        Library for inotify
Group:          Development/Libraries/C and C++

%description -n libinotifytools%{soname}
Library needed by inotify.

%package -n libinotifytools-devel
Summary:        Development files for inotify
Group:          Development/Libraries/C and C++
Requires:       libinotifytools%{soname} = %{version}

%description -n libinotifytools-devel
Files needed to develop applications based on libinotify.

%prep
%setup -q -n "inotify-tools-%{version}"
%patch1 -p1

%build
autoreconf -fi
%configure --enable-doxygen --disable-static
make %{?_smp_mflags}

%check
make check

%install
make DESTDIR=%{buildroot} install
install -d "%{buildroot}%{_docdir}/libinotifytools"
mv "%{buildroot}%{_datadir}/doc/inotify-tools" \
	"%{buildroot}%{_docdir}/libinotifytools/html"
find "%{buildroot}%{_libdir}" -name "*.la" -exec rm {} \;

%post -n libinotifytools%{soname} -p /sbin/ldconfig

%postun -n libinotifytools%{soname} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_bindir}/inotifywait
%{_bindir}/inotifywatch
%doc %{_mandir}/man1/inotifywait.1*
%doc %{_mandir}/man1/inotifywatch.1*

%files -n libinotifytools%{soname}
%defattr(-,root,root)
%{_libdir}/libinotifytools.so.%{soname}
%{_libdir}/libinotifytools.so.%{soname}.*

%files -n libinotifytools-devel
%defattr(-,root,root)
%dir %{_docdir}/libinotifytools
%doc %{_docdir}/libinotifytools/html
%{_includedir}/inotifytools
%{_libdir}/libinotifytools.so

%changelog
openSUSE Build Service is sponsored by