Skip to content

Commit

Permalink
unetbootin: added
Browse files Browse the repository at this point in the history
  • Loading branch information
conraid committed Oct 30, 2015
1 parent cad19a2 commit 49edf79
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 0 deletions.
11 changes: 11 additions & 0 deletions unetbootin/doinst.sh
@@ -0,0 +1,11 @@
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
chroot . /usr/bin/update-desktop-database -q /usr/share/applications > /dev/null 2>&1
fi

# Update icon cache if one exists
if [ -r usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
chroot . /usr/bin/gtk-update-icon-cache -t -f -q usr/share/icons/hicolor >/dev/null 2>&1
fi
fi
19 changes: 19 additions & 0 deletions unetbootin/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------------------------------------------------------|
unetbootin: UNetbootin (create bootable Live USB drives)
unetbootin:
unetbootin: UNetbootin lets you create bootable live usb drives for Linux
unetbootin: distributions without burning a CD.
unetbootin:
unetbootin:
unetbootin:
unetbootin:
unetbootin:
unetbootin:
unetbootin:
108 changes: 108 additions & 0 deletions unetbootin/unetbootin.SlackBuild
@@ -0,0 +1,108 @@
#!/bin/sh
#
# Slackware build script for unetbootin
#
# Copyright 2015 Corrado Franco (http://conraid.net)
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version, with the following exception:
# the text of the GPL license may be omitted.

# This program is distributed in the hope that it will be useful, but
# without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. Compiling,
# interpreting, executing or merely reading the text of the program
# may result in lapses of consciousness and/or very being, up to and
# including the end of all existence and the Universe as we know it.
# See the GNU General Public License for more details.

# You may have received a copy of the GNU General Public License along
# with this program (most likely, a file named COPYING). If not, see
# <http://www.gnu.org/licenses/>.
#
# Latest version of this SlackBuild at https://github.com/conraid/SlackBuilds

set -eu

CWD=$(pwd)

PRGNAM=${PRGNAM:-unetbootin}
VERSION=${VERSION:-613}
BUILD=${BUILD:-1}
TAG=${TAG:-cf}
TMP=${TMP:-/tmp/pkg}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

DOCFILES="README* INSTALL"

if [ -z ${ARCH:=""} ]; then
case "$( uname -m )" in
i?86) ARCH=i686 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
archname="i386"
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"
archname="amd64"
else
echo "Support only 86 platform"
exit
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PRGNAM-$VERSION
mkdir -p $PRGNAM-$VERSION
cd $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-source-$VERSION.tar.gz

chown -R root:root .
find . \
\( -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 {} \;

sed -i '/^RESOURCES/d' unetbootin.pro
lupdate unetbootin.pro
lrelease unetbootin.pro
qmake \
PREFIX=/usr QMAKE_CFLAGS="" QMAKE_CXXFLAGS="" QMAKE_CFLAGS_RELEASE="$SLKCFLAGS" QMAKE_CXXFLAGS_RELEASE="$SLKCFLAGS" \
"DEFINES += NOSTATIC" "RESOURCES -= unetbootin.qrc"
make

install -Dsm755 $PRGNAM $PKG/usr/bin/unetbootin

mkdir -p $PKG/usr/share/$PRGNAM/
install -m644 ${PRGNAM}*.qm $PKG/usr/share/$PRGNAM/
install -Dm644 $PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
for i in 16 22 24 32 48 256; do
install -Dm644 ${PRGNAM}_${i}.png $PKG/usr/share/icons/hicolor/${i}x${i}/apps/$PRGNAM.png
done
install -Dm644 ${PRGNAM}_icons.svg $PKG/usr/share/pixmaps/$PRGNAM.svg

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCFILES $PKG/usr/doc/$PRGNAM-$VERSION || true
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/*

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:-txz}
10 changes: 10 additions & 0 deletions unetbootin/unetbootin.info
@@ -0,0 +1,10 @@
PRGNAM="unetbootin"
VERSION="613"
HOMEPAGE="https://unetbootin.github.io"
DOWNLOAD="http://downloads.sourceforge.net//unetbootin/unetbootin-source-613.tar.gz"
FILENAME="unetbootin-source-613.tar.gz"
MD5SUM="93607004cf4dd99110c6ee75cd841b0a"
SHASUM="ddecc14c9b55a9cdfda630ec9422d0309ee0a705"
REQUIRES=""
MAINTAINER="Corrado Franco"
EMAIL="conraid (at) linux (dot) it"

0 comments on commit 49edf79

Please sign in to comment.