From 087beaa3fbc1b121b498425e88d574c57787be4c Mon Sep 17 00:00:00 2001 From: Tracy Williams Date: Sun, 2 Jan 2011 12:33:46 -0200 Subject: office/lcal: Added (generates graphical "lunar phase" calendar) Signed-off-by: Niels Horn --- office/lcal/README | 4 +++ office/lcal/bindir_destdir.diff | 33 +++++++++++++++++++ office/lcal/lcal.SlackBuild | 73 +++++++++++++++++++++++++++++++++++++++++ office/lcal/lcal.info | 10 ++++++ office/lcal/slack-desc | 19 +++++++++++ 5 files changed, 139 insertions(+) create mode 100644 office/lcal/README create mode 100644 office/lcal/bindir_destdir.diff create mode 100644 office/lcal/lcal.SlackBuild create mode 100644 office/lcal/lcal.info create mode 100644 office/lcal/slack-desc (limited to 'office') diff --git a/office/lcal/README b/office/lcal/README new file mode 100644 index 0000000000..3948b0de71 --- /dev/null +++ b/office/lcal/README @@ -0,0 +1,4 @@ +LCAL is a multi-platform (Unix/Linux, DOS, DOS+DJGPP, Windows+Cygwin) +program which generates full-year PostScript lunar (moon phase) calendars +in a 2-page format, a compressed 1-page format, or an "odd-days-only" +1-page format. diff --git a/office/lcal/bindir_destdir.diff b/office/lcal/bindir_destdir.diff new file mode 100644 index 0000000000..264a753549 --- /dev/null +++ b/office/lcal/bindir_destdir.diff @@ -0,0 +1,33 @@ +diff -Naur lcal-2.1.0_orig/Makefile lcal-2.1.0/Makefile +--- lcal-2.1.0_orig/Makefile 2006-08-04 19:02:48.000000000 -0700 ++++ lcal-2.1.0/Makefile 2011-01-01 18:03:23.492235946 -0800 +@@ -103,7 +103,7 @@ + MANDIR = $(DJDIR)/man/man1 + CATDIR = $(DJDIR)/man/cat1 + else # Unix +- BINDIR = /usr/local/bin ++ BINDIR = /usr/bin + MANDIR = /usr/man/man1 + CATDIR = /usr/man/cat1 + endif +@@ -192,12 +192,11 @@ + groff -man -Tascii $(DOCDIR)/lcal.man >$(DOCDIR)/lcal-help.txt + + install: $(EXECDIR)/$(LCAL) man +- cp $(EXECDIR)/$(LCAL) $(BINDIR) +- if [ -d $(MANDIR) ]; then \ +- cp $(DOCDIR)/lcal.man $(MANDIR)/lcal.1; \ +- $(PACK) $(MANDIR)/lcal.1; \ +- fi +- if [ -d $(CATDIR) ]; then \ +- cp $(DOCDIR)/lcal.cat $(CATDIR)/lcal.1; \ +- $(PACK) $(CATDIR)/lcal.1; \ +- fi ++ mkdir -p $(DESTDIR)/$(BINDIR) ++ mkdir -p $(DESTDIR)/$(MANDIR) ++ mkdir -p $(DESTDIR)/$(CATDIR) ++ cp $(EXECDIR)/$(LCAL) $(DESTDIR)/$(BINDIR) ++ cp $(DOCDIR)/lcal.man $(DESTDIR)/$(MANDIR)/lcal.1 ++ $(PACK) $(DESTDIR)/$(MANDIR)/lcal.1 ++ cp $(DOCDIR)/lcal.cat $(DESTDIR)/$(CATDIR)/lcal.1 ++ $(PACK) $(DESTDIR)/$(CATDIR)/lcal.1 diff --git a/office/lcal/lcal.SlackBuild b/office/lcal/lcal.SlackBuild new file mode 100644 index 0000000000..b3ecdecd4e --- /dev/null +++ b/office/lcal/lcal.SlackBuild @@ -0,0 +1,73 @@ +#!/bin/sh + +# Slackware build script for lcal +# Written by Tracy Williams +# contact: t_s_williams[at]yahoo[dot]com + +PRGNAM=lcal +VERSION=2.1.0 +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -eu + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tgz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R a-s,u+w,go+r-w . + +### There is no configure script for this application. +### Makefile - change BINDIR to /usr/bin and also add DESTDIR awareness. +patch -p1 < $CWD/bindir_destdir.diff + +make CFLAGS="$SLKCFLAGS" +make install DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +### Man pages are compressed, should be gzipped +find $PKG/usr/man -type f -exec uncompress {} \; +find $PKG/usr/man -type f -exec gzip -9 {} \; + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ReadMe.txt lcal-help.html lcal-help.ps lcal-help.txt \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/office/lcal/lcal.info b/office/lcal/lcal.info new file mode 100644 index 0000000000..d9ba6be264 --- /dev/null +++ b/office/lcal/lcal.info @@ -0,0 +1,10 @@ +PRGNAM="lcal" +VERSION="2.1.0" +HOMEPAGE="http://pcal.sourceforge.net" +DOWNLOAD="http://downloads.sourceforge.net/pcal/lcal-2.1.0.tgz" +MD5SUM="c0ef6cca9296b8fe00efb2687a27eeb1" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Tracy Williams" +EMAIL="t_s_williams[at]yahoo[dot]com" +APPROVED="Niels Horn" diff --git a/office/lcal/slack-desc b/office/lcal/slack-desc new file mode 100644 index 0000000000..bf020da8c7 --- /dev/null +++ b/office/lcal/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +lcal: lcal (generates graphical "lunar phase" calendar for an entire year) +lcal: +lcal: LCAL is a multi-platform (Unix/Linux, DOS, DOS+DJGPP, Windows+Cygwin) +lcal: program which generates full-year PostScript lunar (moon phase) +lcal: calendars in a 2-page format, a compressed 1-page format, or an +lcal: "odd-days-only" 1-page format. +lcal: +lcal: It is run from the command line. +lcal: +lcal: Homepage: http://pcal.sourceforge.net +lcal: -- cgit v1.2.3