From 81efe6c63650341e1604ba158268b131e9801755 Mon Sep 17 00:00:00 2001 From: Robby Workman Date: Wed, 28 May 2014 23:32:27 +0700 Subject: misc/brewtarget: Added (free brewing software). Signed-off-by: Willy Sudiarto Raharjo --- misc/brewtarget/README | 9 + misc/brewtarget/brewtarget.SlackBuild | 101 ++ misc/brewtarget/brewtarget.info | 10 + misc/brewtarget/doinst.sh | 13 + ...desktop.in-Define-only-the-icon-name-no-p.patch | 29 + ...es-brewtarget_icon.svg-to-images-brewtarg.patch | 1172 ++++++++++++++++++++ ...instances-of-brewtarget_icon.svg-to-brewt.patch | 105 ++ ...on-to-datadir-icons-hicolor-scalable-apps.patch | 37 + misc/brewtarget/slack-desc | 19 + 9 files changed, 1495 insertions(+) create mode 100644 misc/brewtarget/README create mode 100644 misc/brewtarget/brewtarget.SlackBuild create mode 100644 misc/brewtarget/brewtarget.info create mode 100644 misc/brewtarget/doinst.sh create mode 100644 misc/brewtarget/patches/0001-brewtarget.desktop.in-Define-only-the-icon-name-no-p.patch create mode 100644 misc/brewtarget/patches/0002-Rename-images-brewtarget_icon.svg-to-images-brewtarg.patch create mode 100644 misc/brewtarget/patches/0003-Change-all-instances-of-brewtarget_icon.svg-to-brewt.patch create mode 100644 misc/brewtarget/patches/0004-Install-icon-to-datadir-icons-hicolor-scalable-apps.patch create mode 100644 misc/brewtarget/slack-desc diff --git a/misc/brewtarget/README b/misc/brewtarget/README new file mode 100644 index 0000000000..dc36e4e235 --- /dev/null +++ b/misc/brewtarget/README @@ -0,0 +1,9 @@ +Brewtarget is FREE brewing software, and an open source beer recipe +creation tool available for Linux, Mac, and Windows. It automatically +calculates color, bitterness, and other parameters for you while you +drag and drop ingredients into the recipe. Brewtarget also has many +other tools such as priming sugar calculators, OG correction help, +and a unique mash designing tool. It also can export and import recipes +in BeerXML, allowing you to easily share recipes with friends who use +BeerSmith or other programs. All of this means that Brewtarget is your +single, free, go-to tool when crafting your beer recipes. diff --git a/misc/brewtarget/brewtarget.SlackBuild b/misc/brewtarget/brewtarget.SlackBuild new file mode 100644 index 0000000000..fbb3147f6a --- /dev/null +++ b/misc/brewtarget/brewtarget.SlackBuild @@ -0,0 +1,101 @@ +#!/bin/sh + +# Slackware build script for brewtarget + +# Copyright 2014 Robby Workman, Northport, Alabama, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=brewtarget +VERSION=${VERSION:-2.0.2} +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}_${VERSION}.orig.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# All of these are submitted upstream and slated for inclusion +patch -p1 < $CWD/patches/0001-brewtarget.desktop.in-Define-only-the-icon-name-no-p.patch +patch -p1 < $CWD/patches/0002-Rename-images-brewtarget_icon.svg-to-images-brewtarg.patch +patch -p1 < $CWD/patches/0003-Change-all-instances-of-brewtarget_icon.svg-to-brewt.patch +patch -p1 < $CWD/patches/0004-Install-icon-to-datadir-icons-hicolor-scalable-apps.patch + +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DDOCDIR="/usr/doc/$PRGNAM-$VERSION" \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. + +find $PKG -print0 | xargs -0 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 COPY* README* $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 +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/misc/brewtarget/brewtarget.info b/misc/brewtarget/brewtarget.info new file mode 100644 index 0000000000..7f84f0491d --- /dev/null +++ b/misc/brewtarget/brewtarget.info @@ -0,0 +1,10 @@ +PRGNAM="brewtarget" +VERSION="2.0.2" +HOMEPAGE="http://www.brewtarget.org" +DOWNLOAD="https://launchpad.net/brewtarget/trunk/2.0.2/+download/brewtarget_2.0.2.orig.tar.gz" +MD5SUM="779138ce2263dd4a13bca5e346c1219c" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Robby Workman" +EMAIL="rworkman@slackbuilds.org" diff --git a/misc/brewtarget/doinst.sh b/misc/brewtarget/doinst.sh new file mode 100644 index 0000000000..9424ce43ff --- /dev/null +++ b/misc/brewtarget/doinst.sh @@ -0,0 +1,13 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/misc/brewtarget/patches/0001-brewtarget.desktop.in-Define-only-the-icon-name-no-p.patch b/misc/brewtarget/patches/0001-brewtarget.desktop.in-Define-only-the-icon-name-no-p.patch new file mode 100644 index 0000000000..11c5d41a50 --- /dev/null +++ b/misc/brewtarget/patches/0001-brewtarget.desktop.in-Define-only-the-icon-name-no-p.patch @@ -0,0 +1,29 @@ +From c9d4152db8fb929e62a86a75474dcca6f2425022 Mon Sep 17 00:00:00 2001 +From: Robby Workman +Date: Tue, 27 May 2014 22:27:00 -0500 +Subject: [PATCH 1/4] brewtarget.desktop.in: Define only the icon name (no + path/extension) + +This commit defines the icon name as only "brewtarget" - it will +require subsequent commit(s) to change the icon name and location +to which it installs. +--- + brewtarget.desktop.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/brewtarget.desktop.in b/brewtarget.desktop.in +index c3ae613..cc96055 100644 +--- a/brewtarget.desktop.in ++++ b/brewtarget.desktop.in +@@ -4,7 +4,7 @@ Exec=brewtarget + Name=Brewtarget + GenericName=Beer calculator + X-KDE-StartupNotify=true +-Icon=${brewtarget_ICONS_LOCATION}/brewtarget_icon.svg ++Icon=brewtarget + Terminal=false + Type=Application + +-- +1.8.4 + diff --git a/misc/brewtarget/patches/0002-Rename-images-brewtarget_icon.svg-to-images-brewtarg.patch b/misc/brewtarget/patches/0002-Rename-images-brewtarget_icon.svg-to-images-brewtarg.patch new file mode 100644 index 0000000000..4dcab67722 --- /dev/null +++ b/misc/brewtarget/patches/0002-Rename-images-brewtarget_icon.svg-to-images-brewtarg.patch @@ -0,0 +1,1172 @@ +From 88ff442772b60f0fe98553afc2a74e92990efbf0 Mon Sep 17 00:00:00 2001 +From: Robby Workman +Date: Tue, 27 May 2014 22:29:43 -0500 +Subject: [PATCH 2/4] Rename images/brewtarget_icon.svg to + images/brewtarget.svg + +This commit depends on subsequent commits to the build +system and such. +--- + images/brewtarget.svg | 571 +++++++++++++++++++++++++++++++++++++++++++++ + images/brewtarget_icon.svg | 571 --------------------------------------------- + 2 files changed, 571 insertions(+), 571 deletions(-) + create mode 100644 images/brewtarget.svg + delete mode 100644 images/brewtarget_icon.svg + +diff --git a/images/brewtarget.svg b/images/brewtarget.svg +new file mode 100644 +index 0000000..77f8f7c +--- /dev/null ++++ b/images/brewtarget.svg +@@ -0,0 +1,571 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ image/svg+xml ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff --git a/images/brewtarget_icon.svg b/images/brewtarget_icon.svg +deleted file mode 100644 +index 77f8f7c..0000000 +--- a/images/brewtarget_icon.svg ++++ /dev/null +@@ -1,571 +0,0 @@ +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- image/svg+xml +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-- +1.8.4 + diff --git a/misc/brewtarget/patches/0003-Change-all-instances-of-brewtarget_icon.svg-to-brewt.patch b/misc/brewtarget/patches/0003-Change-all-instances-of-brewtarget_icon.svg-to-brewt.patch new file mode 100644 index 0000000000..414f5e5629 --- /dev/null +++ b/misc/brewtarget/patches/0003-Change-all-instances-of-brewtarget_icon.svg-to-brewt.patch @@ -0,0 +1,105 @@ +From 7ef94eaedbf142e35f36e4dff5f5f24d55569495 Mon Sep 17 00:00:00 2001 +From: Robby Workman +Date: Tue, 27 May 2014 22:31:48 -0500 +Subject: [PATCH 3/4] Change all instances of brewtarget_icon.svg to + brewtarget.svg + +--- + CMakeLists.txt | 2 +- + brewtarget.qrc | 2 +- + images/brewtarget.svg | 2 +- + src/config.in | 2 +- + ui/btSplashScreen.ui | 2 +- + ui/mainWindow.ui | 4 ++-- + 6 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 42e7592..0515bd6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -255,7 +255,7 @@ SET( brewtarget_DESKTOP + + # Icon files to install. + SET( brewtarget_ICONS +- ${ROOTDIR}/images/brewtarget_icon.svg ++ ${ROOTDIR}/images/brewtarget.svg + ) + + SET( TRANSLATIONS_FILES +diff --git a/brewtarget.qrc b/brewtarget.qrc +index c9edfbc..f07b59b 100644 +--- a/brewtarget.qrc ++++ b/brewtarget.qrc +@@ -1,7 +1,7 @@ + + + images/backup.png +- images/brewtarget_icon.svg ++ images/brewtarget.svg + images/bubbles.svg + images/clipboard.svg + images/clock.svg +diff --git a/images/brewtarget.svg b/images/brewtarget.svg +index 77f8f7c..a55fff5 100644 +--- a/images/brewtarget.svg ++++ b/images/brewtarget.svg +@@ -15,7 +15,7 @@ + id="svg11771" + version="1.1" + inkscape:version="0.47 r22583" +- sodipodi:docname="brewtarget_icon.svg"> ++ sodipodi:docname="brewtarget.svg"> + + + + +- :/images/brewtarget_icon.svg ++ :/images/brewtarget.svg + + + +diff --git a/ui/mainWindow.ui b/ui/mainWindow.ui +index 3eac7db..f95f829 100644 +--- a/ui/mainWindow.ui ++++ b/ui/mainWindow.ui +@@ -30,7 +30,7 @@ + + + +- :/images/brewtarget_icon.svg:/images/brewtarget_icon.svg ++ :/images/brewtarget.svg:/images/brewtarget.svg + + + +@@ -89,7 +89,7 @@ + + + +- :/images/brewtarget_icon.svg:/images/brewtarget_icon.svg ++ :/images/brewtarget.svg:/images/brewtarget.svg + + + +-- +1.8.4 + diff --git a/misc/brewtarget/patches/0004-Install-icon-to-datadir-icons-hicolor-scalable-apps.patch b/misc/brewtarget/patches/0004-Install-icon-to-datadir-icons-hicolor-scalable-apps.patch new file mode 100644 index 0000000000..f2021d478e --- /dev/null +++ b/misc/brewtarget/patches/0004-Install-icon-to-datadir-icons-hicolor-scalable-apps.patch @@ -0,0 +1,37 @@ +From a44f5fcf0779b84c75bf3c6c99f1c659c1da0d14 Mon Sep 17 00:00:00 2001 +From: Robby Workman +Date: Tue, 27 May 2014 22:34:24 -0500 +Subject: [PATCH 4/4] Install icon to $datadir/icons/hicolor/scalable/apps + +--- + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0515bd6..1362c89 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -200,9 +200,9 @@ ENDIF() + + # If it begins with a '/' + IF( IS_ABSOLUTE ${DATAROOTDIR} ) +- SET( brewtarget_ICONS_LOCATION "${DATAROOTDIR}/icons/${CMAKE_PROJECT_NAME}" ) ++ SET( brewtarget_ICONS_LOCATION "${DATAROOTDIR}/icons/hicolor/scalable/apps/" ) + ELSE() +- SET( brewtarget_ICONS_LOCATION "/${DATAROOTDIR}/icons/${CMAKE_PROJECT_NAME}" ) ++ SET( brewtarget_ICONS_LOCATION "/${DATAROOTDIR}/icons/hicolor/scalable/apps/" ) + ENDIF() + + CONFIGURE_FILE( brewtarget.desktop.in brewtarget.desktop ) +@@ -488,7 +488,7 @@ IF( NOT ${BUILD_DESIGNER_PLUGINS} ) + IF( UNIX AND NOT APPLE ) + # Install the icons. + INSTALL( FILES ${brewtarget_ICONS} +- DESTINATION "${DATAROOTDIR}/icons/${CMAKE_PROJECT_NAME}" ) ++ DESTINATION "${DATAROOTDIR}/icons/hicolor/scalable/apps/" ) + + # Install the .desktop file. + INSTALL( FILES ${brewtarget_DESKTOP} +-- +1.8.4 + diff --git a/misc/brewtarget/slack-desc b/misc/brewtarget/slack-desc new file mode 100644 index 0000000000..abb371635a --- /dev/null +++ b/misc/brewtarget/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +brewtarget: brewtarget (free brewing software) +brewtarget: +brewtarget: Brewtarget is FREE brewing software, and an open source beer recipe +brewtarget: creation tool. It automatically calculates color, bitterness, and +brewtarget: other parameters for you while you drag and drop ingredients into the +brewtarget: recipe. Brewtarget also has many other tools such as priming sugar +brewtarget: calculators, OG correction help, and a unique mash designing tool. +brewtarget: It also can export and import recipes in BeerXML, allowing you to +brewtarget: easily share recipes with friends who use BeerSmith or other programs. +brewtarget: All of this means that Brewtarget is your single, free, go-to tool +brewtarget: when crafting your beer recipes. -- cgit v1.2.3