From cf8b7ad5d66979a666e0c399aec5e9db6175aebd Mon Sep 17 00:00:00 2001 From: "Cezary M. Kruk" Date: Sun, 9 Dec 2012 11:00:52 -0500 Subject: misc/solunar: Added (utility displaying sun- and moon-related data) Signed-off-by: dsomero --- misc/solunar/README | 4 +++ misc/solunar/slack-desc | 19 +++++++++++ misc/solunar/solunar.SlackBuild | 74 +++++++++++++++++++++++++++++++++++++++++ misc/solunar/solunar.info | 10 ++++++ misc/solunar/solunar.patch | 61 +++++++++++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 misc/solunar/README create mode 100644 misc/solunar/slack-desc create mode 100644 misc/solunar/solunar.SlackBuild create mode 100644 misc/solunar/solunar.info create mode 100644 misc/solunar/solunar.patch (limited to 'misc/solunar') diff --git a/misc/solunar/README b/misc/solunar/README new file mode 100644 index 0000000000..a00192fa67 --- /dev/null +++ b/misc/solunar/README @@ -0,0 +1,4 @@ +solunar is a simple, command-line utility for rapidly displaying sun- and +moon-related data, such as sunset times and equinoxes. solunar produces +output that can be readily parsed by scripts, although it is reasonably +human-readable. diff --git a/misc/solunar/slack-desc b/misc/solunar/slack-desc new file mode 100644 index 0000000000..a80a346984 --- /dev/null +++ b/misc/solunar/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------------------------------------------------------| +solunar: solunar (utility displaying sun- and moon-related data) +solunar: +solunar: solunar is a simple, command-line utility for rapidly displaying sun- +solunar: and moon-related data, such as sunset times and equinoxes. solunar +solunar: produces output that can be readily parsed by scripts, although it is +solunar: reasonably human-readable. +solunar: +solunar: +solunar: +solunar: +solunar: diff --git a/misc/solunar/solunar.SlackBuild b/misc/solunar/solunar.SlackBuild new file mode 100644 index 0000000000..1961dd80f8 --- /dev/null +++ b/misc/solunar/solunar.SlackBuild @@ -0,0 +1,74 @@ +#!/bin/sh + +# Slackware build script for solunar +# Written by Cezary M. Kruk (c.kruk@bigfoot.com) + +PRGNAM=solunar +VERSION=${VERSION:-0.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 -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT + +cd $TMP +rm -rf $PRGNAM-$VERSION +tar -xvf $CWD/$PRGNAM.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +patch -p0 < $CWD/solunar.patch + +make + +mkdir -p $PKG/usr/bin +cp -a solunar $PKG/usr/bin + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + NOTES README_solunar.html TODO \ + $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/misc/solunar/solunar.info b/misc/solunar/solunar.info new file mode 100644 index 0000000000..d15bd8e27a --- /dev/null +++ b/misc/solunar/solunar.info @@ -0,0 +1,10 @@ +PRGNAM="solunar" +VERSION="0.1.0" +HOMEPAGE="http://kevinboone.net/README_solunar.html" +DOWNLOAD="http://kevinboone.net/solunar.tar.gz" +MD5SUM="e264e77db001c5ded56725088db36ac0" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Cezary M. Kruk" +EMAIL="c.kruk@bigfoot.com" diff --git a/misc/solunar/solunar.patch b/misc/solunar/solunar.patch new file mode 100644 index 0000000000..0573debf66 --- /dev/null +++ b/misc/solunar/solunar.patch @@ -0,0 +1,61 @@ +--- main.c.old 2012-05-21 13:55:30.000000000 +0200 ++++ main.c 2012-09-13 18:29:00.000000000 +0200 +@@ -54,7 +54,7 @@ + printf (" -d, --datetime [date_time] set date and/or time\n"); + printf (" --datetime help show date/time format\n"); + printf (" -f, --full print full data\n"); +- printf (" -h print brief help message\n"); ++ printf (" -h, --help print brief help message\n"); + printf (" -l, --latlong [+DDMM+DDDMM] latitude/longitude\n"); + printf (" --latlong help show lat/long format\n"); + printf (" --days list significant days in year\n"); +@@ -301,9 +301,9 @@ + {"latlong", required_argument, NULL, 'l'}, + {"longhelp", no_argument, &opt_longhelp, 0}, + {"quiet", no_argument, &opt_quiet, 'q'}, +- {"utc", no_argument, &opt_utc, 'v'}, ++ {"utc", no_argument, &opt_utc, 'u'}, + {"version", no_argument, &opt_version, 'v'}, +- {"list-named-days", no_argument, &opt_list_named_days, 0}, ++ {"days", no_argument, &opt_list_named_days, 0}, + {0, 0, 0, 0}, + }; + +@@ -325,7 +325,7 @@ + { + opt_utc = TRUE; + } +- if (strcmp (long_options[option_index].name, "list-named-days") == 0) ++ if (strcmp (long_options[option_index].name, "days") == 0) + { + opt_list_named_days = TRUE; + } +@@ -634,7 +634,7 @@ + SUNTIMES_CIVIL_TWILIGHT, + opt_utc, tz, workingLatlong, datetimeObj); + print_sunset_time (" Civil twilight ends: ", +- SUNTIMES_NAUTICAL_TWILIGHT, ++ SUNTIMES_CIVIL_TWILIGHT, + opt_utc, tz, workingLatlong, datetimeObj); + + print_sunrise_time (" Nautical twilight starts: ", +@@ -695,7 +695,7 @@ + for (i = 0; i < nevents; i++) + { + char *s = DateTime_time_to_string_local (events[i], tz); +- printf (" Moonset: %s\n", s); ++ printf (" Moonrise: %s\n", s); + free (s); + DateTime_free (events[i]); + } +--- TODO.old 2012-05-21 14:19:58.000000000 +0200 ++++ TODO 2012-09-13 18:56:00.000000000 +0200 +@@ -4,7 +4,7 @@ + year, or the current year if none set. The rest of the date information + is ignored. To get the days for a specific year you can do, for example, + +-solunar --list-named-days --datetime 1#2013 ++solunar --days --datetime 1#2013 + + Note all dates and times, both specified and output, are local to the home + locale, or the city specified by --city, unless --utc is given. The --utc -- cgit v1.2.3