File sgrep-1.92a.spec of Package sgrep
#
# spec file for package sgrep (Version 1.92a)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: sgrep
License: GPLv2+
Group: Productivity/Text/Utilities
AutoReqProv: on
Version: 1.92a
Release: 966
Summary: Searching for Structured Patterns
Source: ftp://ftp.cs.helsinki.fi/pub/Software/Local/Sgrep/sgrep-%{version}.tar.gz
Patch: sgrep-sgreprc.diff
Patch1: sgrep-no-build-date.patch
Url: http://www.cs.helsinki.fi/~jjaakkol/sgrep.html
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Sgrep is like "grep" but it will also work for structured patterns. You
can use the program to extract fragments from SGML/XML or any other
well formed text files (including UTF-8 encoded files).
Authors:
--------
Jani Jaakkola <jjaakkol@cs.helsinki.fi>
Pekka Kilpelainen <kilpelai@cs.helsinki.fi>
%define INSTALL install -m755 -s
%define INSTALL_SCRIPT install -m755
%define INSTALL_DIR install -d -m755
%define INSTALL_DATA install -m644
%prep
%setup -q
%patch -p 1
%patch1
%build
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
./configure --prefix=%{_prefix} --sysconfdir=/etc --datadir=/etc \
--mandir=%{_mandir}
make
%install
if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then
export RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT
%{INSTALL_DIR} $RPM_BUILD_ROOT
fi
make DESTDIR=$RPM_BUILD_ROOT install
%{INSTALL_DATA} sample.sgreprc $RPM_BUILD_ROOT/%{_sysconfdir}/sgreprc
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/sample.sgreprc
%clean
rm -fr $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README sgrep.lsm
%doc sample.sgreprc
%config %{_sysconfdir}/sgreprc
%{_bindir}/sgrep
%{_mandir}/*/*
%changelog