File gcal.spec of Package gcal

#
# spec file for package gcal (Version 3.01)
#
# Copyright (c) 2009 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:           gcal
BuildRequires:  ncurses-devel
License:        GPL v2 or later
Group:          Productivity/Office/Organizers
AutoReqProv:    on
Summary:        A Program for Printing Calendars
Version:        3.01
Release:        718
Source:         ftp://ftp.gnu.org/gnu/gcal/gcal-%{version}.tar.bz2
Patch0:         gcal-bavarian-holiday.patch
Patch1:         gcal-3.01-relsymlinks.patch
Patch2:         gcal-3.01-gcc_twice_variable_use.patch
Patch3:         gcal-3.01-po_encoding.patch
Patch4:         gcal-3.01-longerstrings.patch
Patch5:         gcal-3.01-glibc210.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
PreReq:         %install_info_prereq

%description
Gcal is a program for printing calendars.  Gcal displays a calendar for
a month or a year, eternal holiday lists, and fixed date lists.  The
program correctly omits the dates that were skipped when the current
Gregorian calendar replaced the earlier Julian calendar.



Authors:
--------
    Thomas Esken <esken@uni-muenster.de>

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4
%patch5 -p1
# force rebuilding of .mo files (see bug #248859):
rm po/*.gmo

%build
./configure --prefix=/usr --mandir=%_mandir \
  --infodir=%_infodir
make "CFLAGS=$RPM_OPT_FLAGS" 

%install
rm -rf $RPM_BUILD_ROOT
make install prefix=$RPM_BUILD_ROOT/usr \
	infodir=$RPM_BUILD_ROOT%{_infodir} \
	mandir=$RPM_BUILD_ROOT%{_mandir}/man1
make doclang=de prefix=$RPM_BUILD_ROOT/usr infodir=$RPM_BUILD_ROOT%{_infodir}/de \
     mandir=$RPM_BUILD_ROOT%{_mandir}/de/man1 install
perl -pi -e "s,$RPM_BUILD_ROOT,," $RPM_BUILD_ROOT/usr/share/gcal/misc/*/*
rm -f $RPM_BUILD_ROOT/%_infodir/de/dir*
rm -f $RPM_BUILD_ROOT/%_infodir/dir*
rm -f $RPM_BUILD_ROOT/usr/share/locale/locale.alias
%find_lang %name

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%install_info --info-dir=%{_infodir}/de %{_infodir}/de/%{name}.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%install_info_delete --info-dir=%{_infodir}/de %{_infodir}/de/%{name}.info.gz

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %name.lang
%defattr(-,root,root)
%doc ABOUT-NLS ATTENTION BUGS COPYING DISCLAIM HISTORY LIMITATIONS MANIFEST
%doc NEWS README SYMBOLS THANKS TODO
%doc data/gcalrc
/usr/share/gcal
/usr/bin/*
%dir %_infodir/de
%lang(de) %_infodir/de/gcal.info*.gz
%_infodir/gcal.info*.gz
%lang(de) %_mandir/de/man1/*
%_mandir/man1/*

%changelog
* Thu Jun 11 2009 coolo@novell.com
- fix build with glibc 2.10
* Mon Apr 02 2007 rguenther@suse.de
- Add ncurses-devel BuildRequires
* Tue Feb 27 2007 mfabian@suse.de
- Bugzilla #248859: fix part of the problem (for all translated
  messages) by regenerating the .mo files.
  The encoding problem still exists for all msgids which are
  non-ASCII *and* which are untranslated or fuzzy.
* Mon Feb 19 2007 uli@suse.de
- extended string buffers from 1k to 2k (necessary if you have a
  very long list of countries for -q)
* Tue Jan 16 2007 kssingvo@suse.de
- beautified specfile, and renamed diff to patch filenames
- fixed compiler problem with double use of same variable
- fixed issue with charset encoding of files.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Feb 29 2004 ro@suse.de
- remove dir files in info directories
* Thu Feb 26 2004 hmacht@suse.de
- building as non-root user
- fixing filelist
* Thu Jan 22 2004 schwab@suse.de
- Put info dir in the same directory as the info files.
* Tue Jul 01 2003 coolo@suse.de
- possibly it's all my fault
* Tue Jul 01 2003 coolo@suse.de
- fixing build
* Mon Jun 16 2003 kssingvo@suse.de
- added %%dir /usr/share/info/de
* Wed May 28 2003 ro@suse.de
- remove unpackaged files from buildroot
* Thu Apr 24 2003 ro@suse.de
- fix install_info --delete call and move from preun to postun
* Mon Feb 10 2003 mmj@suse.de
- Use %%install_info macros [#23409]
- Use BuildRoot:
* Tue Sep 17 2002 ro@suse.de
- removed bogus self-provides
* Wed Jun 19 2002 ke@suse.de
- spec file:
  - Use RPM macros more consistently.
  - Move ./configure to the %%build section.
- Make sure to display bavarian related holidays properly; apply patch
  provided by Klaus Singvogel [# 15955].
* Thu Nov 30 2000 bjacke@suse.de
- updated to 3.01
* Fri Feb 25 2000 kukuk@suse.de
- Move /usr/{info,man} -> /usr/share/{info,man}
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Thu Sep 09 1999 bs@suse.de
- fixed call of Check at the end of %%install section
* Sun Sep 14 1997 Karl Eichwalder <ke@suse.de>
- gcal 2.40: initial package
openSUSE Build Service is sponsored by