2009-12-06

Slitaz -- pcmanfm-0.5.2





root@slitaz:/home/slitaz/wok# tazwok cook pcmanfm
.......
make[2]: Leaving directory `/home/slitaz/wok/pcmanfm/pcmanfm-0.5.2'
make[1]: Leaving directory `/home/slitaz/wok/pcmanfm/pcmanfm-0.5.2'
================================================================================
pcmanfm compiled on : 20091206 00:03:57


Building pcmanfm with the receipt...
================================================================================
Executing strip on all files... [ OK ]
Copying the receipt... [ OK ]
Creating the list of files... [ OK ]
Creating md5sum of files... [ OK ]
Compressing the fs... [ OK ]
Updating receipt sizes... [ OK ]
Creating full cpio archive... [ OK ]
Restoring original package tree... 1047 blocks
================================================================================
Package pcmanfm (0.5.2) generated.
Size : 184.0k /home/slitaz/packages/pcmanfm-0.5.2.tazpkg

root@slitaz:/home/slitaz/wok# ls -l ../packages/pcmanfm*
-rw-r--r-- 1 root root 183768 Dec 5 23:08 ../packages/pcmanfm-0.5.2-orig.tazpkg
-rw-r--r-- 1 root root 183988 Dec 6 00:03 ../packages/pcmanfm-0.5.2.tazpkg
root@slitaz:/home/slitaz/wok#

root@slitaz:/home/slitaz/wok# ls -l pcmanfm/stuff
drwxr-xr-x 2 root root 4096 Dec 2 09:17 applications
-r-xr-xr-x 1 root root 652 Dec 5 23:57 archiver-tazpkg-7z-rar.patch
-rw-r--r-- 1 root root 517 Dec 2 09:17 archiver-tazpkg-support.patch-orig
-rw-r--r-- 1 root root 270 Dec 2 09:17 ca.patch
-rw-r--r-- 1 root root 40854 Dec 2 09:17 fr.po
-rw-r--r-- 1 root root 1599 Dec 2 09:17 pcmanfm.png
root@slitaz:/home/slitaz/wok#

root@slitaz:/home/slitaz/wok# cat pcmanfm/stuff/archiver-tazpkg-support.patch-orig
--- src/ptk/ptk-file-archiver.c Sun May 25 14:59:12 2008
+++ src/ptk/ptk-file-archiver.c Thu Jun 25 23:28:10 2009
@@ -10,6 +10,8 @@
*
*/

+/* 06-25-2009 Erjo: Add support for tazpkg */
+
#include
#include

@@ -61,6 +63,12 @@
"tar -xvf",
".tar", TRUE
},
+ {
+ "application/x-tazpkg",
+ "tazpkg pack",
+ "tazpkg extract",
+ ".tazpkg", FALSE
+ }
/*
{
"application/x-rar",
root@slitaz:/home/slitaz/wok#

root@slitaz:/home/slitaz/wok# cat pcmanfm/stuff/archiver-tazpkg-7z-rar.patch
--- src/ptk/ptk-file-archiver.c Sun Jun 7 11:42:37 2009
+++ src/ptk/ptk-file-archiver.c Sat Dec 5 23:47:44 2009
@@ -61,14 +61,24 @@
"tar -xvf",
".tar", TRUE
},
- /*
+ {
+ "application/x-tazpkg",
+ "tazpkg pack",
+ "tazpkg extract",
+ ".tazpkg", FALSE
+ },
{
+ "application/x-7z-compressed",
+ "7zr a -bd -y",
+ "7zr x -bd -y",
+ ".7z", TRUE
+ },
+ {
"application/x-rar",
NULL,
"unrar -o- e",
".rar", TRUE
}
- */
};


root@slitaz:/home/slitaz/wok#


root@slitaz:/home/slitaz/wok# cat pcmanfm/pcmanfm-0.5.2/src/ptk/ptk-file-archiver.c | head -n 83 | tail -n 53

const ArchiveHandler handlers[]=
{
{
"application/x-bzip-compressed-tar",
"tar --bzip2 -cvf",
"tar --bzip2 -xvf",
".tar.bz2", TRUE
},
{
"application/x-compressed-tar",
"tar -czvf",
"tar -xzvf",
".tar.gz", TRUE
},
{
"application/x-gzip",
"gzip",
"gunzip",
".gz", TRUE
},
{
"application/zip",
"zip -r",
"unzip",
".zip", TRUE
},
{
"application/x-tar",
"tar -cvf",
"tar -xvf",
".tar", TRUE
},
{
"application/x-tazpkg",
"tazpkg pack",
"tazpkg extract",
".tazpkg", FALSE
},
{
"application/x-7z-compressed",
"7zr a -bd -y",
"7zr x -bd -y",
".7z", TRUE
},
{
"application/x-rar",
NULL,
"unrar -o- e",
".rar", TRUE
}
};

root@slitaz:/home/slitaz/wok# cat /var/lib/tazpkg/installed/pcmanfm


# SliTaz package receipt.

PACKED_SIZE="192.0k"
UNPACKED_SIZE="624.0k"
PACKAGE="pcmanfm"
VERSION="0.5.2"
CATEGORY="system-tools"
SHORT_DESC="Light and easy to use file manager."
MAINTAINER="pankso@slitaz.org"
DEPENDS="glibc-base glib libgio util-linux-ng-uuid libxcb xcb-util expat \
zlib fontconfig freetype gtk+ atk cairo pango pixman libpng gamin \
startup-notification dbus dbus-glib hal xorg-libICE xorg-libSM xorg-libX11 \
xorg-libXau xorg-libXcomposite xorg-libXcursor xorg-libXdamage xorg-libXdmcp \
xorg-libXext xorg-libXfixes xorg-libXinerama xorg-libXrender"
BUILD_DEPENDS="gtk+-dev gamin-dev gamin shared-mime-info intltool hal-dev \
dbus-glib-dev dbus-dev startup-notification-dev libxcb-dev xcb-util-dev"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://pcmanfm.sourceforge.net/"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

# Rules to configure and make the package.
compile_rules()
{
cd $src
for i in ../stuff/*.patch
do
if [ -f done.$(basename $i) ]; then
continue
else
patch -p0 < $i && touch done.$(basename $i) || exit 1
fi
done

cp ../stuff/fr.po $src/po

./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--enable-hal \
$CONFIGURE_ARGS &&
make &&
make DESTDIR=$PWD/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
mkdir -p $fs/usr/share
cp -a $_pkg/usr/bin $fs/usr
cp -a $_pkg/usr/share/mime $fs/usr/share
cp -a $_pkg/usr/share/pcmanfm $fs/usr/share
rm -rf $fs/usr/share/pcmanfm/icons
}

post_install()
{
# update mime-cache
echo "Updating mime-types database"
update-mime-database $1/usr/share/mime
}