misc/brewtarget: Updated for version 2.3.1.

This commit is contained in:
Robby Workman 2021-04-25 16:26:26 -05:00 committed by Willy Sudiarto Raharjo
parent e01ed00e1a
commit 24f943af54
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
6 changed files with 12 additions and 1360 deletions

View File

@ -2,7 +2,7 @@
# Slackware build script for brewtarget
# Copyright 2014 Robby Workman, Northport, Alabama, USA
# Copyright 2014,2021 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -23,13 +23,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=brewtarget
VERSION=${VERSION:-2.0.2}
VERSION=${VERSION:-2.3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -60,7 +60,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/${PRGNAM}_${VERSION}.orig.tar.gz
tar xvf $CWD/${PRGNAM}_${VERSION}.orig.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@ -69,19 +69,14 @@ find -L . \
\( -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
mkdir -p build && 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 ..
-DCMAKE_BUILD_TYPE=Release \
-Wno-dev ..
make
make install DESTDIR=$PKG
cd ..

View File

@ -1,8 +1,8 @@
PRGNAM="brewtarget"
VERSION="2.0.2"
VERSION="2.3.1"
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="https://github.com/Brewtarget/brewtarget/releases/download/v2.3.1/brewtarget_2.3.1.orig.tar.xz"
MD5SUM="266b8ae75d76638b1dde314118a766eb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""

View File

@ -1,29 +0,0 @@
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

@ -1,105 +0,0 @@
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

@ -1,37 +0,0 @@
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