From dd3221e405ea98ed393ac56152b6a7d8bb09c2b1 Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Sat, 29 Feb 2020 07:43:29 +0700 Subject: misc/rbutil: Added (Rockbox Utility). Signed-off-by: Willy Sudiarto Raharjo --- misc/rbutil/README | 3 + misc/rbutil/doinst.sh | 6 ++ misc/rbutil/patches/rbutil-1.4.1-quazip.patch | 63 ++++++++++++++ misc/rbutil/rbutil.SlackBuild | 117 ++++++++++++++++++++++++++ misc/rbutil/rbutil.info | 10 +++ misc/rbutil/slack-desc | 19 +++++ 6 files changed, 218 insertions(+) create mode 100644 misc/rbutil/README create mode 100644 misc/rbutil/doinst.sh create mode 100644 misc/rbutil/patches/rbutil-1.4.1-quazip.patch create mode 100644 misc/rbutil/rbutil.SlackBuild create mode 100644 misc/rbutil/rbutil.info create mode 100644 misc/rbutil/slack-desc (limited to 'misc/rbutil') diff --git a/misc/rbutil/README b/misc/rbutil/README new file mode 100644 index 0000000000..6659264264 --- /dev/null +++ b/misc/rbutil/README @@ -0,0 +1,3 @@ +This is the automated installer tool for Rockbox. + +Rockbox is a free replacement firmware for digital music players. diff --git a/misc/rbutil/doinst.sh b/misc/rbutil/doinst.sh new file mode 100644 index 0000000000..19400050fd --- /dev/null +++ b/misc/rbutil/doinst.sh @@ -0,0 +1,6 @@ +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 -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi + diff --git a/misc/rbutil/patches/rbutil-1.4.1-quazip.patch b/misc/rbutil/patches/rbutil-1.4.1-quazip.patch new file mode 100644 index 0000000000..596127c340 --- /dev/null +++ b/misc/rbutil/patches/rbutil-1.4.1-quazip.patch @@ -0,0 +1,63 @@ +This patch is a simplified version of a patch I have sent upstream. +http://gerrit.rockbox.org/1825 + +-- Chewi + +diff -Naur a/base/ziputil.cpp b/base/ziputil.cpp +--- a/base/ziputil.cpp 2019-11-10 06:45:49.000000000 +0000 ++++ b/base/ziputil.cpp 2019-12-04 22:38:34.443112450 +0000 +@@ -22,9 +22,9 @@ + #include "progressloggerinterface.h" + #include "Logger.h" + +-#include "quazip/quazip.h" +-#include "quazip/quazipfile.h" +-#include "quazip/quazipfileinfo.h" ++#include ++#include ++#include + + + ZipUtil::ZipUtil(QObject* parent) : ArchiveUtil(parent) +diff -Naur a/base/ziputil.h b/base/ziputil.h +--- a/base/ziputil.h 2019-11-10 06:45:49.000000000 +0000 ++++ b/base/ziputil.h 2019-12-04 22:38:34.443112450 +0000 +@@ -21,9 +21,9 @@ + + #include + #include "archiveutil.h" +-#include "quazip/quazip.h" +-#include "quazip/quazipfile.h" +-#include "quazip/quazipfileinfo.h" ++#include ++#include ++#include + + class ZipUtil : public ArchiveUtil + { +diff -Naur a/rbutilqt.pro b/rbutilqt.pro +--- a/rbutilqt.pro 2019-11-10 06:45:50.000000000 +0000 ++++ b/rbutilqt.pro 2019-12-04 22:43:30.144259710 +0000 +@@ -131,7 +131,7 @@ + + DEPENDPATH = $$INCLUDEPATH + +-LIBS += -L$$OUT_PWD -L$$MYLIBBUILDDIR ++LIBS += -L$$OUT_PWD -L$$MYLIBBUILDDIR -lquazip5 + # append all RBLIBS to LIBS + for(rblib, RBLIBS) { + LIBS += -l$$rblib +@@ -142,7 +142,6 @@ + + # on win32 libz is linked implicitly. + !win32 { +- LIBS += -lz + } + + # Add a (possibly found) libspeex now, don't do this before -lrbspeex! +@@ -271,5 +270,4 @@ + + # source files are separate. + include(rbutilqt.pri) +-include(quazip/quazip.pri) + include(logger/logger.pri) diff --git a/misc/rbutil/rbutil.SlackBuild b/misc/rbutil/rbutil.SlackBuild new file mode 100644 index 0000000000..276898c55c --- /dev/null +++ b/misc/rbutil/rbutil.SlackBuild @@ -0,0 +1,117 @@ +#!/bin/sh + +# Slackware build script for RockboxUtility + +# Copyright 2020 Kyle Guinn +# 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=rbutil +SRCNAM=RockboxUtility +VERSION=${VERSION:-1.4.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$(uname -m) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM-$VERSION +OUTPUT=${OUTPUT:-/tmp} + +DOCS="docs/COPYING" + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -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 $SRCNAM-v$VERSION +tar xvf $CWD/$SRCNAM-v$VERSION-src.tar.bz2 +cd $SRCNAM-v$VERSION +chown -R root:root . +chmod -R u+w,go-w,a+rX-st . + +cd rbutil/rbutilqt + +# Use the system quazip. Thanks to gentoo. +# Remove the quazip5 -> quazip renaming if using qt5. +patch -p1 < $CWD/patches/rbutil-1.4.1-quazip.patch +sed -i 's/quazip5/quazip/' base/ziputil.cpp +sed -i 's/quazip5/quazip/' base/ziputil.h +sed -i 's/quazip5/quazip/' rbutilqt.pro +sed -i 's/\$\$_PRO_FILE_PWD_\/zlib//' rbutilqt.pro +rm -rf quazip zlib + +# Decrease the amount of log spam. +sed -i 's/Logger::Debug/Logger::Warning/' logger/AbstractAppender.cpp + +# Build the translations first to avoid warnings. +lrelease rbutilqt.pro + +# SLKCFLAGS aren't always respected. +# $CC is not quoted properly. "ccache gcc" (the default) will fail. +qmake \ + QMAKE_CFLAGS="$SLKCFLAGS" \ + QMAKE_CXXFLAGS="$SLKCFLAGS" \ + -config noccache \ + rbutilqt.pro +make + +install -D -m 0755 -s RockboxUtility $PKG/usr/bin/RockboxUtility +# Some of these icons aren't exactly square. +for i in 16 32 48 64 128 256; do + install -D -m 0644 icons/rockbox-$i.png $PKG/usr/share/icons/hicolor/$i\x$i/apps/rockbox.png +done + +cd ../.. + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $DOCS $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/rbutil/rbutil.info b/misc/rbutil/rbutil.info new file mode 100644 index 0000000000..9995c98fca --- /dev/null +++ b/misc/rbutil/rbutil.info @@ -0,0 +1,10 @@ +PRGNAM="rbutil" +VERSION="1.4.1" +HOMEPAGE="https://www.rockbox.org/wiki/RockboxUtility" +DOWNLOAD="https://download.rockbox.org/rbutil/source/RockboxUtility-v1.4.1-src.tar.bz2" +MD5SUM="0e29f60ee87f433087c6ead09dde81f3" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="speex cryptopp quazip" +MAINTAINER="Kyle Guinn" +EMAIL="elyk03@gmail.com" diff --git a/misc/rbutil/slack-desc b/misc/rbutil/slack-desc new file mode 100644 index 0000000000..15093b73b1 --- /dev/null +++ b/misc/rbutil/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------------------------------------------------------| +rbutil: rbutil (Rockbox Utility) +rbutil: +rbutil: This is the automated installer tool for Rockbox. +rbutil: +rbutil: Rockbox is a free replacement firmware for digital music players. +rbutil: +rbutil: +rbutil: +rbutil: +rbutil: +rbutil: -- cgit v1.2.3