fef6a52
%define alphatag 20110531cvs
84bc925
1705741
Summary: Reminder utility
1705741
Name:    calendar
David Cantrell 63e5722
Version: 1.26
7a72326
Release: 3.%{alphatag}%{?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.
84bc925
Source0: %{name}-%{version}-%{alphatag}.tar.gz
1705741
Source1: Makefile.linux
1705741
Source2: export-calendar-source.sh
1705741
David Cantrell 63e5722
Patch0:  %{name}-1.26-linux.patch
David Cantrell 63e5722
Patch1:  %{name}-1.26-coding.patch
1705741
a55ee6b
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n)
1705741
fef6a52
Requires: cpp
fef6a52
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
84bc925
%setup -q -n %{name}-%{version}-%{alphatag}
1705741
%patch0 -p1
b11318f
%patch1 -p1
a55ee6b
cp %{SOURCE1} Makefile
1705741
b11318f
for c in calendars/*.*/* ; do
a55ee6b
    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"
a55ee6b
        mv "$c.conv" "$c"
b11318f
    fi
b11318f
done
b11318f
1705741
%build
a55ee6b
make %{?_smp_mflags}
1705741
1705741
%install
a55ee6b
rm -rf %{buildroot}
a55ee6b
make install DESTDIR=%{buildroot}
1705741
1705741
%clean
a55ee6b
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
7a72326
* Fri Jun 02 2011 David Cantrell <dcantrell@redhat.com> - 1.26-3.20110531cvs
7a72326
- Must increment release number regardless of cvstag
7a72326
fef6a52
* Tue May 31 2011 David Cantrell <dcantrell@redhat.com> - 1.26-1.20110531cvs
fef6a52
- Upgraded to calendar source from OpenBSD 4.9 (corrects two dates)
fef6a52
- Require cpp (#708609)
fef6a52
f317adc
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.26-2.20110115cvs
f317adc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f317adc
David Cantrell 63e5722
* Sat Jan 15 2011 David Cantrell <dcantrell@redhat.com> - 1.26-1.20110115cvs
David Cantrell 63e5722
- Upgraded to calendar source from OpenBSD 4.8
David Cantrell 63e5722
a55ee6b
* Fri May 21 2010 David Cantrell <dcantrell@redhat.com> - 1.25-10.20091114cvs
a55ee6b
- Do not use RPM macros for basic commands in the spec file
a55ee6b
0cb9b13
* Wed Feb 24 2010 David Cantrell <dcantrell@redhat.com> - 1.25-9.20091114cvs
0cb9b13
- Add missing parens around srandom() and random() calls
0cb9b13
84bc925
* Sat Nov 14 2009 David Cantrell <dcantrell@redhat.com> - 1.25-8.20091114cvs
84bc925
- Upgraded to calendar snapshot from OpenBSD 4.6
84bc925
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