misc/brewtarget: Added (free brewing software).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Robby Workman 2014-05-28 23:32:27 +07:00 committed by Willy Sudiarto Raharjo
parent e727be292e
commit 81efe6c636
9 changed files with 1495 additions and 0 deletions

9
misc/brewtarget/README Normal file
View file

@ -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.

View file

@ -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}

View file

@ -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"

13
misc/brewtarget/doinst.sh Normal file
View file

@ -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

View file

@ -0,0 +1,29 @@
From c9d4152db8fb929e62a86a75474dcca6f2425022 Mon Sep 17 00:00:00 2001
From: Robby Workman <rworkman@slackware.com>
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

View file

@ -0,0 +1,105 @@
From 7ef94eaedbf142e35f36e4dff5f5f24d55569495 Mon Sep 17 00:00:00 2001
From: Robby Workman <rworkman@slackware.com>
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 @@
<RCC>
<qresource prefix="/">
<file alias="images/backup.png">images/backup.png</file>
- <file alias="images/brewtarget_icon.svg">images/brewtarget_icon.svg</file>
+ <file alias="images/brewtarget.svg">images/brewtarget.svg</file>
<file alias="images/bubbles.svg">images/bubbles.svg</file>
<file alias="images/clipboard.svg">images/clipboard.svg</file>
<file alias="images/clock.svg">images/clock.svg</file>
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">
<defs
id="defs11773">
<linearGradient
diff --git a/src/config.in b/src/config.in
index 3a0a50d..b7b4003 100644
--- a/src/config.in
+++ b/src/config.in
@@ -19,7 +19,7 @@
#ifndef _CONFIG_H
#define _CONFIG_H
-#define BTICON ":/images/brewtarget_icon.svg"
+#define BTICON ":/images/brewtarget.svg"
//#define ICON96 ":/images/BrewtargetIcon_96.png"
#define GLASS ":/images/glass2.png"
#define SMALLBARLEY ":/images/smallBarley.svg"
diff --git a/ui/btSplashScreen.ui b/ui/btSplashScreen.ui
index b354d9c..2d243f8 100644
--- a/ui/btSplashScreen.ui
+++ b/ui/btSplashScreen.ui
@@ -91,7 +91,7 @@
<string/>
</property>
<property name="pixmap">
- <pixmap resource="../brewtarget.qrc">:/images/brewtarget_icon.svg</pixmap>
+ <pixmap resource="../brewtarget.qrc">:/images/brewtarget.svg</pixmap>
</property>
</widget>
</item>
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 @@
</property>
<property name="windowIcon">
<iconset resource="../brewtarget.qrc">
- <normaloff>:/images/brewtarget_icon.svg</normaloff>:/images/brewtarget_icon.svg</iconset>
+ <normaloff>:/images/brewtarget.svg</normaloff>:/images/brewtarget.svg</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QHBoxLayout" name="horizontalLayout_3">
@@ -89,7 +89,7 @@
</property>
<attribute name="icon">
<iconset resource="../brewtarget.qrc">
- <normaloff>:/images/brewtarget_icon.svg</normaloff>:/images/brewtarget_icon.svg</iconset>
+ <normaloff>:/images/brewtarget.svg</normaloff>:/images/brewtarget.svg</iconset>
</attribute>
<attribute name="title">
<string/>
--
1.8.4

View file

@ -0,0 +1,37 @@
From a44f5fcf0779b84c75bf3c6c99f1c659c1da0d14 Mon Sep 17 00:00:00 2001
From: Robby Workman <rworkman@slackware.com>
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

View file

@ -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.