1705741
Summary: Reminder utility
1705741
Name:    calendar
1705741
Version: 1.25
84b6689
Release: 7%{?dist}
1705741
License: BSD
1705741
Group:   Applications/Productivity
1705741
URL:     http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/calendar
1705741
1705741
# The source archive is generated with the export-calendar-source.sh
1705741
# script.  Update the script's TAG variable when a new version of
1705741
# OpenBSD is released.  The version number we use for the calendar
1705741
# program is the CVS revision ID of the calendar.c file.  This is
1705741
# determined by the script so it can make the source archive.
1705741
Source0: %{name}-%{version}.tar.gz
1705741
Source1: Makefile.linux
1705741
Source2: export-calendar-source.sh
1705741
1705741
Patch0:  %{name}-1.25-linux.patch
b11318f
Patch1:  %{name}-1.25-coding.patch
1705741
1705741
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
1705741
1705741
%description
1705741
The OpenBSD calendar command is a reminder utility.  Calendar reads
1705741
a mix of configuration files and standard calendar databases and
1705741
then displays lines that begin with either today's date or
1705741
tomorrow's.  The output of the command shows upcoming events for the
1705741
week.
1705741
1705741
%prep
1705741
%setup -q
1705741
%patch0 -p1
b11318f
%patch1 -p1
1705741
%{__cp} %{SOURCE1} Makefile
1705741
b11318f
for c in calendars/*.*/* ; do
b11318f
    fromcode="$(%{__grep} '^LANG=' "$c" | %{__sed} 's/^LANG=\(.*\)\.\(.*\)\(@.*\)\{0,1\}/\2/')"
b11318f
    if [ ! -z "$fromcode" ]; then
b11318f
        iconv -f "$fromcode" -t "UTF-8" "$c" > "$c.conv"
b11318f
        %{__mv} "$c.conv" "$c"
b11318f
    fi
b11318f
done
b11318f
1705741
%build
1705741
%{__make} %{?_smp_mflags}
1705741
1705741
%install
1705741
%{__rm} -rf %{buildroot}
1705741
%{__make} install DESTDIR=%{buildroot}
1705741
1705741
%clean
1705741
%{__rm} -rf %{buildroot}
1705741
1705741
%files
1705741
%defattr(-,root,root,-)
1705741
%attr(755,root,root) %{_bindir}/calendar
1705741
%{_mandir}/man1/calendar.1.gz
1705741
%{_datadir}/calendar
1705741
1705741
%changelog
84b6689
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-7
84b6689
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
84b6689
3c7b601
* Thu Apr 09 2009 David Cantrell <dcantrell@redhat.com> - 1.25-6
3c7b601
- Honor RPM_OPT_FLAGS and fix debuginfo (#494717)
3c7b601
b11318f
* Tue Mar 03 2009 David Cantrell <dcantrell@redhat.com> - 1.25-5
b11318f
- Convert output to locale's character coding
b11318f
96898f6
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-4
96898f6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
96898f6
1705741
* Tue Feb 17 2009 David Cantrell <dcantrell@redhat.com> - 1.25-3
1705741
- Use cvs status to get the revision number of calendar.c
1705741
1705741
* Tue Feb 17 2009 David Cantrell <dcantrell@redhat.com> - 1.25-2
1705741
- Fixed problems in export-calendar-source.sh
1705741
- Set permissions on export-calendar-source.sh to 0644
1705741
1705741
* Thu Feb 12 2009 David Cantrell <dcantrell@redhat.com> - 1.25-1
1705741
- Packaged OpenBSD's calendar(1) command from OpenBSD 4.4