Monday, May 31, 2010

Installing wxCam 1.0.6 on Slackware 13.1

,
In the slackbuilds repository, there is wxCam package, but still in version 1.0.4. Now the wxCam has reached version 1.0.6. In order to install it, we need xvidcore, mjpegtools, CImg and wxGTK. All of them can be downloaded at slackbuild's site and installed without problem, except for CImg. At the slackbuild's site, the CImg library source still in version 1.2.9(31 ), but we need CImg-1.3.4 due to wxCam compile error. To make the package, you can use my Slackbuild script. I modify it a little from the original script and you can copy it to text editor and save as [package_name].SlackBuild.
#!/bin/sh
PRGNAM=CImg
VERSION=1.3.4
#change the version to 1.0.6 1.3.4
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_bud}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
unzip $CWD/$PRGNAM-$VERSION.zip #change the command to unzip because the package is in zip format.
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .

mkdir -p $PKG/usr/include/CImg
cat CImg.h > $PKG/usr/include/CImg/CImg.h
( cd $PKG/usr/include/ ; ln -sf /usr/include/CImg/CImg.h . )

mkdir -p $PKG/usr/share/CImg
cp -a plugins/ $PKG/usr/share/CImg

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html
cp -ar CHANGES.txt Licence* README.txt examples \
  $PKG/usr/doc/$PRGNAM-$VERSION/
cp -ar html/* $PKG/usr/doc/$PRGNAM-$VERSION/html #change the directory to html
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

I assumed that you have install this library the other deps package(xvidcore, mjpegtools and wxGTK). Now, let's make the tgz wxCam 1.0.6 package with my script that I modifiy from the original one. You can copy and save the script here also as [package_name].SlackBuild :


#!/bin/sh
PRGNAM=wxcam
VERSION=1.0.6 #change the version to 1.0.6
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_bud}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
   LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
   LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fPIC"
   LIBDIRSUFFIX="64"
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --disable-static \
  --build=$ARCH-slackware-linux

make wxcamdocdir=/usr/doc/$PRGNAM-$VERSION
make install wxcamdocdir=/usr/doc/$PRGNAM-$VERSION DESTDIR=$PKG

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

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG

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}


 After the package creation finished, install it and voila!! Now wxCam 1.0.6 is ready to use without any problem. Enjoy! :D
Read more →

Sunday, May 30, 2010

My Blog Published at Planet Slackware Indonesia

,
Finally, my blog has been published in http://planet.slackware-id.org/ with my hackergotchi picture.. :D. I hope I will more active to write articles about slackware :)
Read more →

Requesting My Blog To Planet Slackware's BlogRoll

,
Today I just requested my blog to http://planet.slackware-id.org/ blogroll and the RSS feeds. The requirements that I must fulfilled are my original name, my blog URL, my slackware articles RSS feeds URL and my picture(optional). The picture must only my head, so I have to cropped the original picture before I submit it. As far as I know, it's called a "hackergotchi". Now, I have to wait confirmation from the administrator. :)
Read more →

Friday, May 28, 2010

Uncompatible libpng 1.4.x For Build VLC 1.0.6

,
Today I try to build VLC 1.0.6 on my Slackware 13.1, but one of it's dependencies(libpng 1.4.2) was not compatible. The solution that I know is downgrade libpng to 1.2.x or disable the libpng support in the configure script parameters, but I won't do it. :p
Due to this situation, I have to wait until the stable VLC 1.1.0 released and use mplayer with smplayer frontend for playing my video. I think it doesn't take a long time because now VLC 1.1.0 was at the RC.
Read more →

Tuesday, May 25, 2010

Waiting For Slackware 13.1-stable ISO

,
Slackware 13.1-stable ISO currently not available yet and on their way to replication. I hope the replication can be done ASAP, and also the IIX mirror site like http://kambing.ui.ac.id/ or http://repo.ugm.ac.id/ has done mirroring it. So I can download the ISO faster. Really, I can't wait to enjoy this new Slackware release!
Read more →

Finally, Slackware 13.1 Stable Released

,
After I wake up this morning, I find the Slackware 13.1 stable released! You can see this announcement in this changelog since the announcement at the home page of slackware official site is currently not updated yet. Thanks to Pat so that now we can enjoy this new release of slackware. :D
Read more →

Friday, May 7, 2010

Slackware 13.1 Stable Release Should Be Just Around The Corner

,
Today, I have check the slackware -current changelog. And yes... finally the development has reach to the beta release with the KDE SC 4.4.3 included there! :) I hope, in the end of this month (May 2010) or before that, I was able to enjoy the slackware 13.1 stable release. :))
Read more →