%define alphatag 20110531cvs Summary: Reminder utility Name: calendar Version: 1.26 Release: 3.%{alphatag}%{?dist} License: BSD Group: Applications/Productivity URL: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/calendar # The source archive is generated with the export-calendar-source.sh # script. Update the script's TAG variable when a new version of # OpenBSD is released. The version number we use for the calendar # program is the CVS revision ID of the calendar.c file. This is # determined by the script so it can make the source archive. Source0: %{name}-%{version}-%{alphatag}.tar.gz Source1: Makefile.linux Source2: export-calendar-source.sh Patch0: %{name}-1.26-linux.patch Patch1: %{name}-1.26-coding.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) Requires: cpp %description The OpenBSD calendar command is a reminder utility. Calendar reads a mix of configuration files and standard calendar databases and then displays lines that begin with either today's date or tomorrow's. The output of the command shows upcoming events for the week. %prep %setup -q -n %{name}-%{version}-%{alphatag} %patch0 -p1 %patch1 -p1 cp %{SOURCE1} Makefile for c in calendars/*.*/* ; do fromcode="$(grep '^LANG=' "$c" | sed 's/^LANG=\(.*\)\.\(.*\)\(@.*\)\{0,1\}/\2/')" if [ ! -z "$fromcode" ]; then iconv -f "$fromcode" -t "UTF-8" "$c" > "$c.conv" mv "$c.conv" "$c" fi done %build make %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %attr(755,root,root) %{_bindir}/calendar %{_mandir}/man1/calendar.1.gz %{_datadir}/calendar %changelog * Fri Jun 02 2011 David Cantrell <dcantrell@redhat.com> - 1.26-3.20110531cvs - Must increment release number regardless of cvstag * Tue May 31 2011 David Cantrell <dcantrell@redhat.com> - 1.26-1.20110531cvs - Upgraded to calendar source from OpenBSD 4.9 (corrects two dates) - Require cpp (#708609) * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.26-2.20110115cvs - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Sat Jan 15 2011 David Cantrell <dcantrell@redhat.com> - 1.26-1.20110115cvs - Upgraded to calendar source from OpenBSD 4.8 * Fri May 21 2010 David Cantrell <dcantrell@redhat.com> - 1.25-10.20091114cvs - Do not use RPM macros for basic commands in the spec file * Wed Feb 24 2010 David Cantrell <dcantrell@redhat.com> - 1.25-9.20091114cvs - Add missing parens around srandom() and random() calls * Sat Nov 14 2009 David Cantrell <dcantrell@redhat.com> - 1.25-8.20091114cvs - Upgraded to calendar snapshot from OpenBSD 4.6 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Apr 09 2009 David Cantrell <dcantrell@redhat.com> - 1.25-6 - Honor RPM_OPT_FLAGS and fix debuginfo (#494717) * Tue Mar 03 2009 David Cantrell <dcantrell@redhat.com> - 1.25-5 - Convert output to locale's character coding * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Tue Feb 17 2009 David Cantrell <dcantrell@redhat.com> - 1.25-3 - Use cvs status to get the revision number of calendar.c * Tue Feb 17 2009 David Cantrell <dcantrell@redhat.com> - 1.25-2 - Fixed problems in export-calendar-source.sh - Set permissions on export-calendar-source.sh to 0644 * Thu Feb 12 2009 David Cantrell <dcantrell@redhat.com> - 1.25-1 - Packaged OpenBSD's calendar(1) command from OpenBSD 4.4