Blob Blame History Raw
Name:           boxes
Version:        1.1
Release:        6%{?dist} 
Summary:        Draw any kind of box around some given text

Group:          Applications/Text
License:        GPLv2+
URL:            http://boxes.thomasjensen.com
Source0:        http://boxes.thomasjensen.com/download/%{name}-%{version}.src.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

# pass compile flags correctly, don't strip debuginfo automagically
Patch1:         boxes-fix_make.patch

BuildRequires:  bison
BuildRequires:  flex

%define boxfile %{_datadir}/%{name}/boxes

%description
"boxes" is a text filter which can draw ASCII art boxes around its input
text. These boxes may also be removed, even if they have been badly damaged
by editing of the text inside. Since boxes may be open on any side, boxes can
also be used to create regional comments in any programming language. With
the help of an editor macro or mapping, damaged boxes can easily be repaired.
This is useful for making the function headers in your programming language
look better, for spicing up your news postings and emails, or just for
decorating your documentation files.  New box designs of all sorts can
easily be added and shared by appending to a free format configuration
file. boxes was intended to be used with the vim(1) text editor, but can
be tied to any text editor which supports filters.


%prep
%setup -q
%patch1 -p1 -b .fix_make

%build
make GLOBALCONF=%{boxfile} CFLAGS_ADTL="%{optflags}" %{?_smp_mflags} 

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 

install -pm 0755 src/boxes      $RPM_BUILD_ROOT%{_bindir}
install -pm 0644 doc/boxes.1    $RPM_BUILD_ROOT%{_mandir}/man1
# the file that contains all the shapes
install -pm 0644 boxes-config   $RPM_BUILD_ROOT%{boxfile}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root, -)
%{_bindir}/boxes
%{_datadir}/%{name}/
%doc %{_mandir}/man1/boxes.1*
%doc COPYING README

%changelog
* Sun Feb 10 2008 Jakub Hrozek <jhrozek@redhat.com> - 1.1-6
- bump release

* Sun Feb 10 2008 Jakub Hrozek <jhrozek@redhat.com> - 1.1-5
- rebuild for GCC 4.3

* Wed Jan 09 2008 Jakub Hrozek <jhrozek@redhat.com> - 1.1-4
- fix the license tag from GPL2 to GPL2+

* Sat Oct 13 2007 Jakub Hrozek <jhrozek@redhat.com> - 1.1-3
- More packaging fixes spotted in review (292121), especially:
- remove slashes between macros and buildroot
- set default permissions for directories in defattr
- fix whitespace change in the patch, rename for clarity
- drop the emacs helper

* Sun Sep 30 2007 Jakub Hrozek <jhrozek@redhat.com> - 1.1-2
- Fix packaging mistakes spotted in the review request, namely:
- patch makefile so that optflags are passed
- use macro for the boxfile location as it's used frequently
- fix rpmlint
- package emacs helper

* Sat Sep 15 2007 Jakub Hrozek <jhrozek@redhat.com> - 1.1-1
- initial packaging