From 3ae3b612d489e05fdf23f7fd09c752cdb44a7f43 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 26 Sep 2008 13:27:00 +0000 Subject: [PATCH] first draft --- Makefile | 53 +++++++++++++++++++++++++++++++ inotify-tools.spec | 77 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 Makefile create mode 100644 inotify-tools.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8c34c02 --- /dev/null +++ b/Makefile @@ -0,0 +1,53 @@ +# $Id: Makefile 7299 2007-12-04 11:59:41Z thierry $ +CURL := curl -H Pragma: -O -R -S --fail --show-error +SHA1SUM = sha1sum + +# default - overridden by the build +SPECFILE = inotify-tools.spec + +version=3.13 + +main.URL := http://dl.sf.net/inotify-tools/inotify-tools-$(version).tar.gz +main.SHA1SUM := cde7073529e68a31e0149bc7ca0a38ea043386cc +main.FILE := $(notdir $(main.URL)) + +# Thierry - when called from within the build, PWD is /build +SOURCEFILES := $(main.FILE) + +$(main.FILE): #FORCE + @if [ ! -e "$@" ] ; then echo "$(CURL) $(main.URL)" ; $(CURL) $(main.URL) ; fi + @if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi + @if test "$$(sha1sum $@ | awk '{print $$1}')" != "$(main.SHA1SUM)" ; then \ + echo "sha1sum of the downloaded $@ does not match the one from 'sources' file" ; \ + echo "Local copy: $$(sha1sum $@)" ; \ + echo "In sources: $$(grep $@ sources)" ; \ + exit 1 ; \ + else \ + ls -l $@ ; \ + fi + +sources: $(SOURCEFILES) +.PHONY: sources + +PWD=$(shell pwd) +PREPARCH ?= noarch +RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)" +trees: sources + rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE) + +srpm: sources + rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE) + +TARGET ?= $(shell uname -m) +rpm: sources + rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE) + +clean: + rm -f *.rpm *.tgz *.bz2 *.gz + +++%: varname=$(subst +,,$@) +++%: + @echo "$(varname)=$($(varname))" ++%: varname=$(subst +,,$@) ++%: + @echo "$($(varname))" diff --git a/inotify-tools.spec b/inotify-tools.spec new file mode 100644 index 0000000..1b54e1c --- /dev/null +++ b/inotify-tools.spec @@ -0,0 +1,77 @@ +# $Id$ +# Authority: dag + +Summary: Command line utilities for inotify +Name: inotify-tools +Version: 3.13 +Release: 1.rf +License: GPL +Group: Applications/System +URL: http://inotify-tools.sourceforge.net/ + +Packager: Dag Wieers +Vendor: Dag Apt Repository, http://dag.wieers.com/apt/ + +Source: http://dl.sf.net/inotify-tools/inotify-tools-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +BuildRequires: autoconf +BuildRequires: doxygen + +%description +inotify-tools is a set of command-line programs for Linux providing +a simple interface to inotify. These programs can be used to monitor +and act upon filesystem events. + +%package devel +Summary: Header files, libraries and development documentation for %{name}. +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the header files, static libraries and development +documentation for %{name}. If you like to develop programs using %{name}, +you will need to install %{name}-devel. + +%prep +%setup + +%build +%configure \ + --disable-dependency-tracking \ + --disable-static \ + --enable-doxygen +%{__make} %{?_smp_mflags} + +%install +%{__rm} -rf %{buildroot} +%{__make} install DESTDIR="%{buildroot}" + +### Clean up buildroot +%{__rm} -rf %{buildroot}%{_docdir} + +%clean +%{__rm} -rf %{buildroot} + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-, root, root, 0755) +%doc AUTHORS ChangeLog COPYING NEWS README +%doc %{_mandir}/man1/inotifywait.1* +%doc %{_mandir}/man1/inotifywatch.1* +%{_bindir}/inotifywait +%{_bindir}/inotifywatch +%{_libdir}/libinotifytools.so.* + +%files devel +%defattr(-, root, root, 0755) +%doc libinotifytools/src/doc/html/* +%{_includedir}/inotifytools/ +%{_libdir}/libinotifytools.so +%exclude %{_libdir}/libinotifytools.la + +%changelog +* Thu Mar 27 2008 Dag Wieers - 3.13-1 - +/ +- Initial package. (using DAR) -- 2.43.0