Blob Blame History Raw
Name:           moreutils
Version:        0.36
Release:        2%{?dist}
Summary:        Additional unix utilities
Group:          Applications/System
License:        GPLv2
URL:            http://kitenet.net/~joey/code/moreutils/
Source0:        http://ftp.debian.org/debian/pool/main/m/%{name}/%{name}_%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  docbook2X docbook-dtds libxml2
Requires:       perl-TimeDate perl-Time-Duration
# These perl modules add functionality to the ts command, as they are added in eval'd code they are not
# picked up automatically by rpm.

%description
 This is a growing collection of the unix tools that nobody thought
 to write thirty years ago.

 So far, it includes the following utilities:
  - isutf8: check if a file or standard input is utf-8
  - sponge: soak up standard input and write to a file
  - ts: timestamp standard input
  - vidir: edit a directory in your text editor
  - vipe: insert a text editor into a pipe
  - combine: combine the lines in two files using boolean operations
  - ifdata: get network interface info without parsing ifconfig output
  - pee: tee standard input to pipes
  - zrun: automatically uncompress arguments to command
  - mispipe: pipe two commands, returning the exit status of the first
  - lckdo: execute a program with a lock held
  - ifne: run a program if the standard input is not empty
  - parallel: run multiple jobs at once

%prep
%setup -qn %{name}
# the required dtd's are not where this package expects them to be, let's fix that
DTDFILE=`xmlcatalog /usr/share/sgml/docbook/xmlcatalog "-//OASIS//DTD DocBook XML V4.4//EN" "-//OASIS//DTD DocBook XML V4.3//EN"|grep -v "No entry"|head -n1`
sed -r -i "s|/usr/share/xml/docbook/schema/dtd/4.4/docbookx.dtd|$DTDFILE|" *.docbook
# the docbook2x-man command is different in fedora, let's fix that too
sed -r -i "s|docbook2x-man|db2x_docbook2man|" Makefile
# a slightly different syntax is required here for the man pages to be built successfully
sed -r -i "s| rep=\"repeat\"||" *.docbook


%build
make %{?_smp_mflags} CFLAGS="%{optflags} -DSUPPORT_LH7 -DMKSTEMP"


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
install -m0755 isutf8 %{buildroot}%{_bindir}
install -m0755 sponge %{buildroot}%{_bindir}
install -m0755 ts %{buildroot}%{_bindir}
install -m0755 vidir %{buildroot}%{_bindir}
install -m0755 vipe %{buildroot}%{_bindir}
install -m0755 combine %{buildroot}%{_bindir}
install -m0755 ifdata %{buildroot}%{_bindir}
install -m0755 pee %{buildroot}%{_bindir}
install -m0755 zrun %{buildroot}%{_bindir}
install -m0755 mispipe %{buildroot}%{_bindir}
install -m0755 lckdo %{buildroot}%{_bindir}
install -m0755 ifne %{buildroot}%{_bindir}
install -m0755 parallel %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/man1
install -m644 sponge.1 %{buildroot}%{_mandir}/man1/
install -m644 vidir.1 %{buildroot}%{_mandir}/man1/
install -m644 vipe.1 %{buildroot}%{_mandir}/man1/
install -m644 isutf8.1 %{buildroot}%{_mandir}/man1/
install -m644 ts.1 %{buildroot}%{_mandir}/man1/
install -m644 combine.1 %{buildroot}%{_mandir}/man1/
install -m644 ifdata.1 %{buildroot}%{_mandir}/man1/
install -m644 pee.1 %{buildroot}%{_mandir}/man1/
install -m644 zrun.1 %{buildroot}%{_mandir}/man1/
install -m644 mispipe.1 %{buildroot}%{_mandir}/man1/
install -m644 lckdo.1 %{buildroot}%{_mandir}/man1/
install -m644 ifne.1 %{buildroot}%{_mandir}/man1/
install -m644 parallel.1 %{buildroot}%{_mandir}/man1/

%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%doc README COPYING
%{_mandir}/man1/*
%{_bindir}/*


%changelog
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.36-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Jul 16 2009 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.36-1%{?dist}
- new upstream version 0.36 released with these changes
- * parallel: New program, contributed by Tollef Fog Heen, that can run multiple jobs in parallel, optionally checking load average.
- * mispipe: Fix closing of extra pipe FD before starting command so it is not inherited by daemons. Closes: #533448 (Thanks, Jeremie Koenig)

* Sat Jul 4 2009 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.35-1%{?dist}
- new upstream version 0.35 released with these changes
- * ifdata: Don't assume that all interface names are 6 characters or less, for instance "wmaster0" is longer.
-   Increase the limit to 20 characters. Closes: #526654 (Thanks, Alan Pope)
- * isutf8: Reject UTF-8-encoded UTF-16 surrogates. Closes: #525301 (Thanks, Jakub Wilk and liw)

* Tue Feb 24 2009 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.34-1%{?dist}
- new upstream version 0.34
- * vipe: Avoid dying on empty input. Thanks, Anders Kaseorg Closes: #508491
- new upstream version 0.33
- * Support installing moreutils into prefixes other than /usr (Evan Broder)
- * Fix zrun breakage introduced last version. Closes: #504129
- new upstream version 0.32
- * zrun: Can be linked to zsomeprog to run the equivilant of zrun someprog. Closes: #411623 (Stefan Fritsch)
- * zrun: Add support for lzma and lzo. (Stefan Fritsch)
- * Fix pod error in vidir(1).

* Thu Oct 16 2008 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.31-3%{?dist}
- Fix for EPEL docbook dtd version

* Sat Oct 11 2008 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.31-2%{?dist}
- Fix for EPEL docbook dtd version

* Thu Aug 21 2008 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.31-1%{?dist}
- new upstream version 0.31 released with these changes
- * pee.1: Document difference with tee in stdout.
- * ts: Support displaying fractional seconds via a "%.S" conversion specification.

* Tue May 20 2008 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.30-1%{?dist}
- new upstream version 0.29 released with these changes
- * Add ifne, contributed by Javier Merino.
- * sponge, ifne: Ensure that suspending/resuming doesn't result in partial writes of the data, by using fwrite() rather than write().
- * sponge: Handle large data sizes by using a temp file rather than by consuming arbitrary amounts of memory. Patch by Brock Noland.
- * ts: Allow both -r and a format to be specified, to parse dates and output in a specified format.
- * ts: Fix bug in timezone regexp.
- New upstream version 0.30 released with these changes
- * debhelper v7; rules file minimisation
- * Use DESTDIR instead of PREFIX.
- * Add a DOCBOOK2XMAN setting. (Greg KH)
- * ifne: Add -n which makes it run the command if stdin is empty.
- * ifne: If no command is specified, print usage information.

* Wed Feb 13 2008 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.28-3%{?dist}
- fixed typo in changelog

* Wed Feb 13 2008 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.28-2%{?dist}
- fixed typo in changelog

* Wed Feb 13 2008 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.28-1%{?dist}
- New upstream version released with these changes
- vidir: Applied patch from Stefan Fritsch
- * Check for control characters (especially newlines) in filenames and error out, since this can greatly confuse the editor or vidir.
- * If the source of a rename does not exist (and thus the rename will fail anyway), vidir should not move an existing target file to a tmpfile.
- * If a directory is renamed, vidir should take that into account when renaming files in this directory.
- * If a directory name is passed as name/ to vidir, vidir should not add second slash after the name.
- vidir: Add support for unlinking directories.
- Add example to man page about recursive modification of directories.

- isutf8: Correct inverted exit code when passed a file to check.

* Wed Dec 12 2007 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.26-1%{?dist}
- Docboox dtd path will now be found using xmlcatalog.
- New upstream version released with these changes
- isutf8: Correct inverted exit code when passed a file to check.

* Wed Nov 14 2007 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.25-1%{?dist}
- New upstream version

* Wed Sep 19 2007 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.24-2%{?dist}
- Added optional perl modules to requirements

* Tue Sep 18 2007 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.24-1%{?dist}
- Version update
- Fixed specfile issues

* Mon Aug 13 2007 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.20-3%{?dist}
- Updated license field re new guidelines

* Mon Jun 18 2007 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.20-2%{?dist}
- optflags fix and extra doc files

* Thu May 24 2007 Marc Bradshaw <fedora@marcbradshaw.co.uk> 0.20-1%{?dist}
- Initial fedora release