Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 9322a96d78813af5781753e5570239ff > files > 3

redet-8.26-3.fc12.src.rpm

%if 0%{?fc7}
%else
  %define _remove_encoding --remove-key Encoding
%endif

Summary:	Regular expression development and execution tool
Name:		redet
Version:	8.26
Release:	3%{?dist}
License:	GPLv3
Group:		Development/Tools
URL:		http://www.billposer.org/Software/redet.html
Source0:	http://www.billposer.org/Software/Downloads/%{name}-%{version}.tar.gz
Source1:	%{name}.png

BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires:	hicolor-icon-theme
Requires:	iwidgets
Requires:	tk
Requires:	xdg-utils

BuildRequires:	desktop-file-utils

BuildArch:	noarch

%description
Redet is a tool for developing and executing regular expressions using any of
more than 50 search programs, editors, and programming languages, intended
both for developing regular expressions for use elsewhere and as a search tool
in its own right.

Additional features include persistent history, extensive help, a variety of
character entry tools, and the ability to change locale while running.

The documentation for this package is in %{name}-doc.

%prep
%setup -q

sed --expression \
  's|set NonBinPath \[file join /usr local share Redet\];|set NonBinPath \[file join %{_datadir} Redet\];|' redet.tcl > redet.tcl.tmp
touch --reference redet.tcl redet.tcl.tmp
mv redet.tcl.tmp redet.tcl

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps

make install PREFIX=%{_prefix} BINDIR=%{_bindir} MANDIR=%{_mandir} \
  DESTDIR=$RPM_BUILD_ROOT

# icon
install -p -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps

desktop-file-install %{?_remove_encoding} --vendor fedora \
  --dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
  ./%{name}.desktop

%clean
rm -rf $RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%files
%defattr(-,root,root,-)
%doc AUTHORS
%doc ChangeLog
%doc COPYING
%doc CREDITS
%doc LICENSE
%doc NEWS
%doc SampleClasses.utf8
%doc SampleCustomCharacterWidgetDefinition_Armenian
%doc SampleCustomCharacterWidgetDefinition_Greek
%doc SampleNewStyleDotRedetRC_Elaborate
%doc SampleNewStyleDotRedetRC_Simple
%doc %{_mandir}/man1/%{name}.1*
%{_bindir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png

%changelog
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.26-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Oct 12 2008 Debarshi Ray <rishi@fedoraproject.org> - 8.26-1
- Version bump to 8.26. Closes Red Hat Bugzilla bug #464335.
- Dropped README-General because it is irrelevant for Fedora users.

* Sun Jul 13 2008 Debarshi Ray <rishi@fedoraproject.org> - 8.24-1
- Version bump to 8.24. Closes Red Hat Bugzilla bug #447203.
- redet.desktop and xdg-open added by upstream.

* Sun Nov 25 2007 Debarshi Ray <rishi@fedoraproject.org> - 8.23-3
- Added 'BINDIR=...' in install stanza.
- Fixed prep stanza to preserve timestamps and use RPM macros.
- Removed Encoding from Desktop Entry for all distributions, except Fedora 7.

* Sun Nov 25 2007 Debarshi Ray <rishi@fedoraproject.org> - 8.23-2
- Upstream re-released tarball.
- Changed value of License to GPLv3.
- Added 'Requires: xdg-utils' and fixed the sources.
- Makefile fixes accepted by upstream.

* Fri Nov 23 2007 Debarshi Ray <rishi@fedoraproject.org> - 8.23-1
- Initial build. Imported SPEC from Rawhide.
- Fixed Makefile to preserve timestamps using 'install -p'.