Cinnamon 2.x porting

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#46 by roelof » 31 Oct 2013, 19:28

First problem.

When I take a slackbuild from that site and I do makepkg I see a message that the source directory could not be made.
How to solve this one ?

Second problem : Is there a good tutorial how I can make good Slackbuilds.
So I can make the builds for the packages which is not present yet.

Roelof

Edit 1: I found this page : http://alien.slackbook.org/AST/
Can I use this one. And must i use then the bare or the web template.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Cinnamon 2.x porting

Post#47 by brokenman » 31 Oct 2013, 22:04

When I take a slackbuild from that site and I do makepkg I see a message that the source directory could not be made.
How to solve this one ?
When you run a slackbuild you shouldn't need to give the command makepkg because it is already in the script. You just run the whatever.SlackBuild file. If you want to manually run makepkg to create a slackware package you must first change into the directory that you did DESTDIR=. For example:

Code: Select all

mkdir /tmp/build
make DESTDIR=/tmp/build install
cd /tmp/build
makepkg -l y -c n /tmp/mypackage.txz
You CAN'T create the package in the same directory. You must give a path outside of the directory that you are in. Please read about creating slackware packages. If I give you an example command the paths are probably important.
Can I use this one. And must i use then the bare or the web template.
The web template will ask for the path to the source file and download it if it is not present in the directory that you run the .SlackBuild file from. The bare template won't download anything and will assume that the source file is already present. If alienbob wrote it then you can use it.
How do i become super user?
Wear your underpants on the outside and put on a cape.

roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#48 by roelof » 01 Nov 2013, 18:28

I have a big problem with cjs.

I use this cjs.Slackbuild

Code: Select all

#!/bin/sh
# Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST
# Copyright 2009, 2010, 2011, 2012, 2013  Eric Hameleers, Eindhoven, Netherlands
# Copyright 2013  Roelof Wobben
# All rights reserved.
#
#   Permission to use, copy, modify, and distribute this software for
#   any purpose with or without fee is hereby granted, provided that
#   the above copyright notice and this permission notice appear in all
#   copies.
#
#   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
#   CONTRIBUTORS 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.
# -----------------------------------------------------------------------------
#
# Slackware SlackBuild script
# ===========================
# By:          Roelof Wobben
# For:         cjs
# Descr:       cinnamon java
# URL:         This module contains JavaScript bindings based on gobject-introspection.
# Needs:
# Changelog:
# 2.0.0-1:     01/Nov/2013 by Roelof Wobben
#              * Initial build.
#
# Run 'sh cjs.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
# Install it using 'installpkg'.
#
# -----------------------------------------------------------------------------

# Set initial variables:

PRGNAM=cjs
VERSION=${VERSION:-2.0.0}
BUILD=${BUILD:-1}
# 'make' can run jobs in parallel for added speed. The number should be higher
# than the number of cores/virtual CPU's in your system:
NUMJOBS=${NUMJOBS:" -j4 "}
# The TAG is a unique identifier for all your Slackware packages.
# Use your initials as the value for TAG for instance.
TAG=${TAG:-_rw}

# This covers most filenames you'd want as documentation. Change if needed.
DOCS="ABOUT* AUTHORS BUGS ChangeLog* COPYING CREDITS FAQ GPL* HACKING \
      LICENSE MAINTAINERS NEWS README* TODO"

# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)

# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

# Input URL: https://github.com/linuxmint/cjs/archive/2.0.0.tar.gz
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
SRCURL="https://github.com/linuxmint/${PRGNAM}/archive/${VERSION}.tar.gz"


##
## --- with a little luck, you won't have to edit below this point --- ##
##

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) export ARCH=$( uname -m ) ;;
  esac
fi

case "$ARCH" in
  i486)   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
          SLKLDFLAGS=""; LIBDIRSUFFIX=""
          ;;
  x86_64) SLKCFLAGS="-O2 -fPIC"
          SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
          ;;
  *)      SLKCFLAGS="-O2"
          SLKLDFLAGS=""; LIBDIRSUFFIX=""
          ;;
esac

# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
# Catch unitialized variables:
set -u
P1=${1:-1}

# Save old umask and set to 0022:
_UMASK_=$(umask)
umask 0022

# Create working directories:
mkdir -p $OUTPUT          # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
mkdir -p $PKG             # place for the package to be built
rm -rf $PKG/*             # always erase old package's contents
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
                          # remove old log files

# Source file availability:
if ! [ -f ${SOURCE} ]; then
  echo "Source '$(basename ${SOURCE})' not available yet..."
  # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
  [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
  if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi
  if ! [ "x${SRCURL}" == "x" ]; then
    echo "Will download file to $(dirname $SOURCE)"
    wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
    if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
      echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
      mv -f "${SOURCE}" "${SOURCE}".FAIL
      exit 1
    fi
  else
    echo "File '$(basename ${SOURCE})' not available... aborting the build."
    exit 1
  fi
fi

if [ "$P1" == "--download" ]; then
  echo "Download complete."
  exit 0
fi

# --- PACKAGE BUILDING ---

echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"

# Explode the package framework:
if [ -f $SRCDIR/_$PRGNAM.tar.gz ]; then
  cd $PKG
  explodepkg $SRCDIR/_$PRGNAM.tar.gz
  cd -
fi

cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
if $(file ${SOURCE} | grep -qi ": 7-zip"); then
  7za x ${SOURCE}
elif $(file ${SOURCE} | grep -qi ": zip"); then
  unzip ${SOURCE}
else
  tar -xvf ${SOURCE}
fi
cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .

echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
./autogen.sh \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --localstatedir=/var \
  --sysconfdir=/etc \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --enable-shared \
  --disable-static \
  --program-prefix= \
  --program-suffix= \
  --build=$ARCH-slackware-linux \
  --enable-thread-safe \
  --with-system-nspr
  2>&1 || exit

make $NUMJOBS 2>&1 || exit
make DESTDIR=$PKG install 2>&1 || exit

# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;

# Compress the man page(s):
if [ -d $PKG/usr/man ]; then
  find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
  for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Compress info pages and remove the package's dir file:
if [ -d $PKG/usr/info ]; then
  rm -f $PKG/usr/info/dir
  gzip -9f $PKG/usr/info/*.info*
  # If any info files are present, consider adding this to a doinst.sh:
  # chroot . install-info /usr/info/XXXXX.info.gz /usr/info/dir 2> /dev/null
fi

# Strip binaries (if any):
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
if [ -f $SRCDIR/doinst.sh ]; then
  cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
fi

# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz}.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt

# Restore the original umask:
umask ${_UMASK_}
and when I run it I see these messages appear

Code: Select all

config.status: executing libtool commands
configure: WARNING: unrecognized options: --enable-thread-safe, --with-system-nspr
Now type `make' to compile gjs
TOP_SRCDIR=. DBUS_SESSION_BUS_ADDRESS='' XDG_DATA_HOME=test_user_data GJS_DEBUG_OUTPUT=test_user_data/logs/gjs.log BUILDDIR=. GJS_USE_UNINSTALLED_FILES=1 GJS_TEST_TIMEOUT=420 GI_TYPELIB_PATH=. LD_LIBRARY_PATH=":" G_FILENAME_ENCODING=latin1 ./scripts/make-tests . 
Replacing old ./gjstest.h and ./gjstest.c
   ./gjstest.h  was 0 bytes now 301
   ./gjstest.c  was 0 bytes now 162
make  all-am
make[1]: Entering directory `/tmp/build/tmp-cjs/cjs-2.0.0'
  CC     console_la-console.lo
  CC     libcjs_la-byteArray.lo
cjs/byteArray.c: In function 'gjs_byte_array_constructor':
cjs/byteArray.c:467:5: warning: passing argument 1 of 'JS_GetClass' from incompatible pointer type [enabled by default]
In file included from cjs/byteArray.h:33:0,
                 from cjs/byteArray.c:27:
/usr/include/js/jsapi.h:2122:1: note: expected 'struct JSObject *' but argument is of type 'struct JSContext *'
cjs/byteArray.c:467:5: error: too many arguments to function 'JS_GetClass'
In file included from cjs/byteArray.h:33:0,
                 from cjs/byteArray.c:27:
/usr/include/js/jsapi.h:2122:1: note: declared here
cjs/byteArray.c:468:5: warning: passing argument 1 of 'JS_GetClass' from incompatible pointer type [enabled by default]
In file included from cjs/byteArray.h:33:0,
                 from cjs/byteArray.c:27:
/usr/include/js/jsapi.h:2122:1: note: expected 'struct JSObject *' but argument is of type 'struct JSContext *'
cjs/byteArray.c:468:5: error: too many arguments to function 'JS_GetClass'
In file included from cjs/byteArray.h:33:0,
                 from cjs/byteArray.c:27:
/usr/include/js/jsapi.h:2122:1: note: declared here
make[1]: *** [libcjs_la-byteArray.lo] Error 1
make[1]: Leaving directory `/tmp/build/tmp-cjs/cjs-2.0.0'
make: *** [all] Error 2
I thought I need to do --enable-threadsafe and --with-system-nspr just like js185 but that will not work.

Roelof

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Cinnamon 2.x porting

Post#49 by brokenman » 01 Nov 2013, 19:38

Not sure what to tell you. I just started mate, installed gnome-common and js185. I then cloned the cjs git repository and exported the source to a package and compiled it without any errors.

I've uploaded the gnome-common package I used (straight from dropline gnome) and the js185 is the standard slackware package. I've also uploaded the .SlackBuild I used for reference.
https://www.dropbox.com/sh/3na8psodymuhwkr/4V5Gler4TE

This is the easy part to compile. The real monsters are in the cinnamon base packages. Good luck with that.

Make sure you compile in this order:
cjs
cinnamon-desktop
cinnamon-session
cinnamon-settings-daemon
cinnamon-control-center
muffin
Cinnamon
nemo
cinnamon-screensaver


Cinnamon won't run without the cinnamon-screensaver and this is going to require PAM since mint includes it. This will be hard wired in Cinnamon. This will not be easy for you since Porteus doesn't use PAM or systemd.
How do i become super user?
Wear your underpants on the outside and put on a cape.

roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#50 by roelof » 01 Nov 2013, 19:48

oke,

I think Im going to do what you earlier said.
Im going to download porteus-fat-gnome which is made by you and going to try that first.
After that I can Always try to make Cinnamon from another DE as Gnome.

Roelof

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Cinnamon 2.x porting

Post#51 by brokenman » 01 Nov 2013, 21:26

Good decision. Compiling on MATE was always going to lead to a dead end. After compiling everything on gnome-3.8 from the latest git it appears some package upgrading may be necessary anyway. I think clutter needs upgrading and that means upgrading a couple of other core packages like atk, so I decided to wait until the next Porteus release.
How do i become super user?
Wear your underpants on the outside and put on a cape.

roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#52 by roelof » 01 Nov 2013, 21:39

oke,

The only problem is that your gnome cd is not working.
See the approiate topic.
I cannot log in at the moment.

roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#53 by roelof » 02 Nov 2013, 19:38

I have this problem.

I try to make cjs which could not find a js header file.
So i try to make a module of the js slackbuild.

But it fails with this message : system nspr does not support pr_static_assert.

How to solve this ?

I did some research and some say that I must unset some flags. Where and how do I do this ?

Roelof

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Cinnamon 2.x porting

Post#54 by brokenman » 02 Nov 2013, 21:19

Did you use the 'bundles' software to download the devpack? This contains all the headers that were extracted.
How do i become super user?
Wear your underpants on the outside and put on a cape.

roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#55 by roelof » 03 Nov 2013, 08:40

Nope,

I cannot download anything drom the bundles.
I described my problem earlier.

roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#56 by roelof » 03 Nov 2013, 09:14

When activating cinnamon-desktop I see this message appear:

Code: Select all

ctivate cinnamon-desktop-2.0.2-x86_64-1_rw.xzm
Updating shared library links:  /sbin/ldconfig
Updating glib schemas: /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas
Updating Gnome shell
xdg-desktop-menu: file to install must be a *.directory or *.desktop file
Try 'xdg-desktop-menu --help' for more information.
xdg-desktop-menu: file to install must be a *.directory or *.desktop file
Try 'xdg-desktop-menu --help' for more information.
xdg-desktop-menu: file to install must be a *.directory or *.desktop file
Try 'xdg-desktop-menu --help' for more information.
The slackbuild looks like this :

Code: Select all

#!/bin/sh
# Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST
# Copyright 2009, 2010, 2011, 2012, 2013  Eric Hameleers, Eindhoven, Netherlands
# Copyright 2013  Your Name <your@email.org>
# All rights reserved.
#
#   Permission to use, copy, modify, and distribute this software for
#   any purpose with or without fee is hereby granted, provided that
#   the above copyright notice and this permission notice appear in all
#   copies.
#
#   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
#   CONTRIBUTORS 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.
# -----------------------------------------------------------------------------
#
# Slackware SlackBuild script
# ===========================
# By:          Roelof Wobben <rwobben@hotmail.com>
# For:         cinnamon-desktop
# Descr:       cinnamon-desktop contains the libcinnamon-desktop l
# URL:         https://github.com/linuxmint/cinnamon-desktop
# Needs:
# Changelog:
# 2.0.2-1:     03/Nov/2013 by Roelof Wobben<rwobben@hotmail.com>
#              * Initial build.
#
# Run 'sh cinnamon-desktop.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
# Install it using 'installpkg'.
#
# -----------------------------------------------------------------------------

# Set initial variables:

PRGNAM=cinnamon-desktop
VERSION=${VERSION:-2.0.2}
BUILD=${BUILD:-1}
# 'make' can run jobs in parallel for added speed. The number should be higher
# than the number of cores/virtual CPU's in your system:
NUMJOBS=${NUMJOBS:" -j4 "}
# The TAG is a unique identifier for all your Slackware packages.
# Use your initials as the value for TAG for instance.
TAG=${TAG:-_rw}

# This covers most filenames you'd want as documentation. Change if needed.
DOCS="ABOUT* AUTHORS BUGS ChangeLog* COPYING CREDITS FAQ GPL* HACKING \
      LICENSE MAINTAINERS NEWS README* TODO"

# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)

# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

# Input URL: https://github.com/linuxmint/cinnamon-desktop/archive/2.0.2.tar.gz
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
SRCURL="https://github.com/linuxmint/${PRGNAM}/archive/${VERSION}.tar.gz"


##
## --- with a little luck, you won't have to edit below this point --- ##
##

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) export ARCH=$( uname -m ) ;;
  esac
fi

case "$ARCH" in
  i486)   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
          SLKLDFLAGS=""; LIBDIRSUFFIX=""
          ;;
  x86_64) SLKCFLAGS="-O2 -fPIC"
          SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
          ;;
  *)      SLKCFLAGS="-O2"
          SLKLDFLAGS=""; LIBDIRSUFFIX=""
          ;;
esac

# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
# Catch unitialized variables:
set -u
P1=${1:-1}

# Save old umask and set to 0022:
_UMASK_=$(umask)
umask 0022

# Create working directories:
mkdir -p $OUTPUT          # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
mkdir -p $PKG             # place for the package to be built
rm -rf $PKG/*             # always erase old package's contents
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
                          # remove old log files

# Source file availability:
if ! [ -f ${SOURCE} ]; then
  echo "Source '$(basename ${SOURCE})' not available yet..."
  # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
  [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
  if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi
  if ! [ "x${SRCURL}" == "x" ]; then
    echo "Will download file to $(dirname $SOURCE)"
    wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true
    if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
      echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
      mv -f "${SOURCE}" "${SOURCE}".FAIL
      exit 1
    fi
  else
    echo "File '$(basename ${SOURCE})' not available... aborting the build."
    exit 1
  fi
fi

if [ "$P1" == "--download" ]; then
  echo "Download complete."
  exit 0
fi

# --- PACKAGE BUILDING ---

echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"

# Explode the package framework:
if [ -f $SRCDIR/_$PRGNAM.tar.gz ]; then
  cd $PKG
  explodepkg $SRCDIR/_$PRGNAM.tar.gz
  cd -
fi

cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
if $(file ${SOURCE} | grep -qi ": 7-zip"); then
  7za x ${SOURCE}
elif $(file ${SOURCE} | grep -qi ": zip"); then
  unzip ${SOURCE}
else
  tar -xvf ${SOURCE}
fi
cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .

echo Building ...
LDFLAGS="$SLKLDFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
./autogen.sh \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --localstatedir=/var \
  --sysconfdir=/etc \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --enable-shared \
  --disable-static \
  --program-prefix= \
  --program-suffix= \
  --build=$ARCH-slackware-linux \
  2>&1 || exit

make $NUMJOBS 2>&1 || exit
make DESTDIR=$PKG install 2>&1 || exit

# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;

# Compress the man page(s):
if [ -d $PKG/usr/man ]; then
  find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
  for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Compress info pages and remove the package's dir file:
if [ -d $PKG/usr/info ]; then
  rm -f $PKG/usr/info/dir
  gzip -9f $PKG/usr/info/*.info*
  # If any info files are present, consider adding this to a doinst.sh:
  # chroot . install-info /usr/info/XXXXX.info.gz /usr/info/dir 2> /dev/null
fi

# Strip binaries (if any):
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/slack-desc > $PKG/install/slack-desc
if [ -f $SRCDIR/doinst.sh ]; then
  cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
fi

# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz} > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-tgz}.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt

# Restore the original umask:
umask ${_UMASK_}

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Cinnamon 2.x porting

Post#57 by brokenman » 03 Nov 2013, 12:44

The package probably doesn't have a .desktop file because it doesn't need a menu entry. The error is nothing to worry about.
How do i become super user?
Wear your underpants on the outside and put on a cape.

roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#58 by roelof » 03 Nov 2013, 12:57

oke,

I now making Cinnamon 2.0.10 so if this is a success two packages to go.

edit 1: For nemo I need Requested 'atspi-2 >= 2.9.4' but version of atspi is 2.8.0

Is there a good Slackbuild for it or must I make it myself.

edit 2:

I succeed in building cinnamon-screensavers for Slackware.
So if I get nemo build we are good to go testing Cinnamon

Edit 3: I forget we do not have a slackbuild for cinnamon-translations because I do not have a idea how we can make a slackbuild of that.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5574
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Cinnamon 2.x porting

Post#59 by brokenman » 03 Nov 2013, 19:44

Is there a good Slackbuild for it or must I make it myself.
I see you havn't taken my advice about the phantomx slackbuilds yet.

I succeed in building cinnamon-screensavers for Slackware.
Excellent. How did you get around the PAM requirement?
Edit 3: I forget we do not have a slackbuild for cinnamon-translations because I do not have a idea how we can make a slackbuild of that.
I havn't looked at the translations file yet. Let me know if it is needed for cinnamon to run.
How do i become super user?
Wear your underpants on the outside and put on a cape.

roelof
Samurai
Samurai
Posts: 112
Joined: 06 Aug 2013, 15:32
Distribution: Porteus 2.1 Gnome
Location: Netherlands

Re: Cinnamon 2.x porting

Post#60 by roelof » 03 Nov 2013, 19:50

Is there a good Slackbuild for it or must I make it myself.
I see you havn't taken my advice about the phantomx slackbuilds yet.
I did look at these builds. I only do not see how I can take care that I have the right version.
I succeed in building cinnamon-screensavers for Slackware
Excellent. How did you get around the PAM requirement?.
I did not. I borrowed the pam slackbuilds of the mate desktop.
Edit 3: I forget we do not have a slackbuild for cinnamon-translations because I do not have a idea how we can make a slackbuild of that.
I havn't looked at the translations file yet. Let me know if it is needed for cinnamon to run.
oke, I do not think there a needed to make Cinnamon run but more if you can set a language other then Englisch.

Post Reply