diff options
author | Petar Petrov <slackalaxy@gmail.com> | 2023-05-01 12:09:57 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-05-06 08:28:23 +0700 |
commit | 5b64c1e3e0fd99ec6c8e481ab6be0ba6e625a328 (patch) | |
tree | 0782dd768ef2d95acde8e74c9cd963746bfdd1d6 /system | |
parent | cbb78a81c2b4225c25428faa5ed62d790d9597c1 (diff) |
system/gnome-pkgtool: Added (A GTK+ front-end to pkgtool)
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/gnome-pkgtool/README | 19 | ||||
-rw-r--r-- | system/gnome-pkgtool/build_disable.patch | 71 | ||||
-rw-r--r-- | system/gnome-pkgtool/doinst.sh | 9 | ||||
-rw-r--r-- | system/gnome-pkgtool/gnome-pkgtool.SlackBuild | 124 | ||||
-rw-r--r-- | system/gnome-pkgtool/gnome-pkgtool.desktop | 8 | ||||
-rw-r--r-- | system/gnome-pkgtool/gnome-pkgtool.info | 10 | ||||
-rw-r--r-- | system/gnome-pkgtool/no_custom_icons.patch | 52 | ||||
-rw-r--r-- | system/gnome-pkgtool/pixmaps/default-package.png | bin | 0 -> 2450 bytes | |||
-rw-r--r-- | system/gnome-pkgtool/pixmaps/gnome-package.png | bin | 0 -> 3356 bytes | |||
-rw-r--r-- | system/gnome-pkgtool/pixmaps/gtk-package.png | bin | 0 -> 2640 bytes | |||
-rw-r--r-- | system/gnome-pkgtool/pixmaps/kde-package.png | bin | 0 -> 4542 bytes | |||
-rw-r--r-- | system/gnome-pkgtool/pixmaps/kernel-package.png | bin | 0 -> 3221 bytes | |||
-rw-r--r-- | system/gnome-pkgtool/pixmaps/lib-package.png | bin | 0 -> 3871 bytes | |||
-rw-r--r-- | system/gnome-pkgtool/slack-desc | 19 |
14 files changed, 312 insertions, 0 deletions
diff --git a/system/gnome-pkgtool/README b/system/gnome-pkgtool/README new file mode 100644 index 0000000000000..2dd2173d956ec --- /dev/null +++ b/system/gnome-pkgtool/README @@ -0,0 +1,19 @@ +This is a GTK+ front-end to the Slackware package management tools +(pkgtool). With gnome-pkgtool you can do the following actions to your +Slackware Linux installation: + +- Install .t?z packages +- Uninstall installed packages +- Re-install/upgrade installed packages +- Inspect packages content + +For its function, gnome-pkgtool relies on installpkg and removepkg +tools for installing and uninstalling packages. + +Upon start, gnome-pkgtool goes though /var/lib/pkgtools/packages/, so it +may take some time to appear. + +NOTE! +This program is from 2004. It seems to work fine, but keep it in mind. +The option to build packages is deprecated (requires checkinstall), so +it is patched out. diff --git a/system/gnome-pkgtool/build_disable.patch b/system/gnome-pkgtool/build_disable.patch new file mode 100644 index 0000000000000..5332979c4ba25 --- /dev/null +++ b/system/gnome-pkgtool/build_disable.patch @@ -0,0 +1,71 @@ +diff -pruN old/src/main_window.c new/src/main_window.c +--- old/src/main_window.c 2004-07-23 02:10:24.000000000 +0300 ++++ new/src/main_window.c 2023-04-27 11:02:28.366906925 +0300 +@@ -21,7 +21,6 @@ + #include "packages.h" + #include "details_window.h" + #include "progress_window.h" +-#include "build_window.h" + #include "pkglist.h" + #include "gpt.h" + +@@ -37,8 +36,6 @@ static gboolean on_menu_close_cb (GtkWid + GptMainWindow *mw); + static gboolean on_menu_about_cb (GtkWidget *widget, + GptMainWindow *mw); +-static gboolean on_menu_build_cb (GtkWidget *widget, +- GptMainWindow *mw); + static gboolean on_menu_install_cb (GtkWidget *widget, + GptMainWindow *mw); + static gboolean on_menu_refresh_cb (GtkWidget *widget, +@@ -128,13 +125,11 @@ gpt_main_window_set_property (GObject + if (g_value_get_boolean (val)) + { + gtk_widget_set_sensitive (mw->priv->menu_install, FALSE); +- gtk_widget_set_sensitive (mw->priv->menu_build, FALSE); + gtk_widget_set_sensitive (mw->priv->btn_uninstall, FALSE); + } + else + { + gtk_widget_set_sensitive (mw->priv->menu_install, TRUE); +- gtk_widget_set_sensitive (mw->priv->menu_build, TRUE); + gtk_widget_set_sensitive (mw->priv->btn_uninstall, TRUE); + } + break; +@@ -180,11 +175,6 @@ gpt_main_window_init (GptMainWindow *mw) + (gpointer) on_menu_install_cb, (gpointer) mw, NULL, + GNOME_APP_PIXMAP_STOCK, "gtk-add", + 0, (GdkModifierType) 0, NULL }, +- { GNOME_APP_UI_ITEM, "_Build From Source...", +- "Build package from source tarball", +- (gpointer) on_menu_build_cb, (gpointer) mw, NULL, +- GNOME_APP_PIXMAP_STOCK, "gtk-convert", +- 0, (GdkModifierType) 0, NULL }, + GNOMEUIINFO_SEPARATOR, + GNOMEUIINFO_MENU_CLOSE_ITEM (on_menu_close_cb, NULL), + GNOMEUIINFO_END +@@ -233,7 +223,6 @@ gpt_main_window_init (GptMainWindow *mw) + + /* remember pointers to some menu items */ + mw->priv->menu_install = menu_file_uiinfo[0].widget; +- mw->priv->menu_build = menu_file_uiinfo[1].widget; + + /* paned */ + align = gtk_alignment_new (0.5, 0.7, 1, 1); +@@ -398,16 +387,6 @@ gpt_main_window_init (GptMainWindow *mw) + } + + static gboolean +-on_menu_build_cb (GtkWidget *widget, GptMainWindow *mw) +-{ +- GtkWidget *bw = gpt_build_window_new (); +- gtk_window_set_transient_for(GTK_WINDOW (bw), GTK_WINDOW (mw)); +- gtk_window_set_destroy_with_parent (GTK_WINDOW (bw), TRUE); +- gtk_widget_show(bw); +- return TRUE; +-} +- +-static gboolean + on_menu_about_cb (GtkWidget *widget, GptMainWindow *mw) + { + GtkWidget *dlg; diff --git a/system/gnome-pkgtool/doinst.sh b/system/gnome-pkgtool/doinst.sh new file mode 100644 index 0000000000000..65c7e2eeb9aa5 --- /dev/null +++ b/system/gnome-pkgtool/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/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 -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/system/gnome-pkgtool/gnome-pkgtool.SlackBuild b/system/gnome-pkgtool/gnome-pkgtool.SlackBuild new file mode 100644 index 0000000000000..ed9b127fff95d --- /dev/null +++ b/system/gnome-pkgtool/gnome-pkgtool.SlackBuild @@ -0,0 +1,124 @@ +#!/bin/bash + +# Slackware build script for gnome-pkgtool + +# Copyright 2023 Petar Petrov slackalaxy@gmail.com +# 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. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=gnome-pkgtool +VERSION=${VERSION:-0.5.2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$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 $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.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 {} \; + +# We don't want custom icons, because they are not scaled and some +# appear huge. We also disable the functions to build a package, since +# it's deprecated. +patch -p1 -i $CWD/no_custom_icons.patch +patch -p1 -i $CWD/build_disable.patch + +# Let's have icons that are a bit more modern +cp -a $CWD/pixmaps/*.png pixmaps + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +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 + +# Remove this and use our desktop file instead +rm -rf $PKG/usr/share/gnome +mkdir -p $PKG/usr/share/applications +cp $CWD/$PRGNAM.desktop $PKG/usr/share/applications + +# This is 47x48 pixels and sbopkglint complains... +convert $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png -resize 48x48! \ + $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png + +# Rename the doc dir and include some more documentation +mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ABOUT-NLS TODO $PKG/usr/doc/$PRGNAM-$VERSION +rm $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL +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 diff --git a/system/gnome-pkgtool/gnome-pkgtool.desktop b/system/gnome-pkgtool/gnome-pkgtool.desktop new file mode 100644 index 0000000000000..b25616d004afa --- /dev/null +++ b/system/gnome-pkgtool/gnome-pkgtool.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=GNOME pkgtool +Comment=Slackware Linux package management tool +Exec=gnome-pkgtool +Icon=gnome-pkgtool +StartupNotify=false +Type=Application +Categories=System diff --git a/system/gnome-pkgtool/gnome-pkgtool.info b/system/gnome-pkgtool/gnome-pkgtool.info new file mode 100644 index 0000000000000..99ea3264e8cb3 --- /dev/null +++ b/system/gnome-pkgtool/gnome-pkgtool.info @@ -0,0 +1,10 @@ +PRGNAM="gnome-pkgtool" +VERSION="0.5.2" +HOMEPAGE="http://gnome-pkgtool.sourceforge.net/" +DOWNLOAD="http://sourceforge.net/projects/gnome-pkgtool/files/gnome-pkgtool/0.5.2/gnome-pkgtool-0.5.2.tar.gz" +MD5SUM="e2e1ae9428f9fa8b1d308c55eb878bff" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="libgnomeui vte2" +MAINTAINER="Petar Petrov" +EMAIL="slackalaxy@gmail.com" diff --git a/system/gnome-pkgtool/no_custom_icons.patch b/system/gnome-pkgtool/no_custom_icons.patch new file mode 100644 index 0000000000000..34d363739a27f --- /dev/null +++ b/system/gnome-pkgtool/no_custom_icons.patch @@ -0,0 +1,52 @@ +diff -pruN old/src/packages.c new/src/packages.c +--- old/src/packages.c 2004-07-22 22:20:17.000000000 +0300 ++++ new/src/packages.c 2021-05-16 19:12:35.881205853 +0300 +@@ -743,47 +743,7 @@ get_pixbuf_from_desktop (PkgEntry *entry + + str = g_malloc (256); + gboolean go = TRUE; +- while (((str = fgets (str, 255, desktop)) != NULL) && go) +- { +- if (fnmatch ("Icon=*", str, 0) == 0) +- { +- f = &str[5]; +- if (index (f, '/')) +- { +- if ((p = index (f, '\n'))) +- *p = '\0'; +- if (entry->pixbuf != NULL) +- g_free (entry->pixbuf); +- entry->pixbuf = gdk_pixbuf_new_from_file (f, NULL); +- +- if(entry->pixbuf) +- { +- go = FALSE; +- } +- } +- else +- { +- if ((p = index (f, '\n'))) +- *p = '\0'; +- p = index (f, '.'); +- +- if(p && (strcmp (".png", p) == 0)) +- *p = '\0'; +- else if(p && (strcmp (".gif", p) == 0)) +- *p = '\0'; +- else if(p && (strcmp (".xpm", p) == 0)) +- *p = '\0'; +- if (entry->pixbuf != NULL) +- g_free (entry->pixbuf); +- +- entry->pixbuf = +- gtk_icon_theme_load_icon (gtk_icon_theme_get_default(), +- f, 48, 0, NULL); +- go = FALSE; +- } +- } +- } +- ++ + g_free (str); + fclose (desktop); + diff --git a/system/gnome-pkgtool/pixmaps/default-package.png b/system/gnome-pkgtool/pixmaps/default-package.png Binary files differnew file mode 100644 index 0000000000000..704d962d4263c --- /dev/null +++ b/system/gnome-pkgtool/pixmaps/default-package.png diff --git a/system/gnome-pkgtool/pixmaps/gnome-package.png b/system/gnome-pkgtool/pixmaps/gnome-package.png Binary files differnew file mode 100644 index 0000000000000..59bba10250833 --- /dev/null +++ b/system/gnome-pkgtool/pixmaps/gnome-package.png diff --git a/system/gnome-pkgtool/pixmaps/gtk-package.png b/system/gnome-pkgtool/pixmaps/gtk-package.png Binary files differnew file mode 100644 index 0000000000000..d35178859b78d --- /dev/null +++ b/system/gnome-pkgtool/pixmaps/gtk-package.png diff --git a/system/gnome-pkgtool/pixmaps/kde-package.png b/system/gnome-pkgtool/pixmaps/kde-package.png Binary files differnew file mode 100644 index 0000000000000..5d3599224f894 --- /dev/null +++ b/system/gnome-pkgtool/pixmaps/kde-package.png diff --git a/system/gnome-pkgtool/pixmaps/kernel-package.png b/system/gnome-pkgtool/pixmaps/kernel-package.png Binary files differnew file mode 100644 index 0000000000000..e3f93dd478919 --- /dev/null +++ b/system/gnome-pkgtool/pixmaps/kernel-package.png diff --git a/system/gnome-pkgtool/pixmaps/lib-package.png b/system/gnome-pkgtool/pixmaps/lib-package.png Binary files differnew file mode 100644 index 0000000000000..24d4b392f451e --- /dev/null +++ b/system/gnome-pkgtool/pixmaps/lib-package.png diff --git a/system/gnome-pkgtool/slack-desc b/system/gnome-pkgtool/slack-desc new file mode 100644 index 0000000000000..05885efa15e75 --- /dev/null +++ b/system/gnome-pkgtool/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------------------------------------------------------| +gnome-pkgtool: gnome-pkgtool (A GTK+ front-end to pkgtool) +gnome-pkgtool: +gnome-pkgtool: With gnome-pkgtool you can do the following: +gnome-pkgtool: 1) Install .T?Z packages +gnome-pkgtool: 2) Uninstall installed packages +gnome-pkgtool: 3) Re-install/upgrade installed packages +gnome-pkgtool: 4) Inspect packages content +gnome-pkgtool: +gnome-pkgtool: +gnome-pkgtool: +gnome-pkgtool: |