wok-next rev 21022

Combine rox-filer
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Nov 03 04:01:01 2018 +0200 (2018-11-03)
parents 418c95dc18df
children 2a618021f5c2
files rox-default-icons/receipt rox-filer-locales/receipt rox-filer/.icon.png rox-filer/receipt rox-filer/stuff/menu.sh rox-filer/stuff/rox-filer rox-filer/stuff/rox-filer.desktop rox-filer/stuff/rox-open-folder-menu.sh rox-filer/stuff/symdup.sh
line diff
     1.1 --- a/rox-default-icons/receipt	Sat Nov 03 03:56:00 2018 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,24 +0,0 @@
     1.4 -# SliTaz package receipt.
     1.5 -
     1.6 -PACKAGE="rox-default-icons"
     1.7 -VERSION="2.8"
     1.8 -CATEGORY="misc"
     1.9 -SHORT_DESC="Default icons for rox-filer"
    1.10 -MAINTAINER="devel@slitaz.org"
    1.11 -LICENSE="GPL2"
    1.12 -WEB_SITE="http://rox.sourceforge.net/desktop/"
    1.13 -
    1.14 -SOURCE="rox-filer"
    1.15 -TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.16 -WGET_URL="$SF_MIRROR/rox/$TARBALL"
    1.17 -
    1.18 -compile_rules() {
    1.19 -	mkdir -p $install/rox-default-icons
    1.20 -	cp -a $src/ROX-Filer/ROX/* $install/rox-default-icons/
    1.21 -}
    1.22 -
    1.23 -genpkg_rules() {
    1.24 -	mkdir -p $fs/usr/share/icons
    1.25 -	cp -r $install/* $fs/usr/share/icons/
    1.26 -	DEPENDS="rox-filer"
    1.27 -}
     2.1 --- a/rox-filer-locales/receipt	Sat Nov 03 03:56:00 2018 +0200
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,27 +0,0 @@
     2.4 -# SliTaz package receipt v2.
     2.5 -
     2.6 -PACKAGE="rox-filer-locales"
     2.7 -VERSION="2.8"
     2.8 -CATEGORY="localization"
     2.9 -SHORT_DESC="Locales for the rox-filer"
    2.10 -MAINTAINER="devel@slitaz.org"
    2.11 -LICENSE="GPL2"
    2.12 -WEB_SITE="http://rox.sourceforge.net/desktop/"
    2.13 -REPOLOGY="rox-filer"
    2.14 -
    2.15 -SOURCE="rox-filer"
    2.16 -TARBALL="$SOURCE-$VERSION.tar.bz2"
    2.17 -WGET_URL="$SF_MIRROR/rox/$TARBALL"
    2.18 -
    2.19 -compile_rules() {
    2.20 -	mkdir -p $install
    2.21 -	cp -r $src/ROX-Filer/Messages $install/
    2.22 -}
    2.23 -
    2.24 -genpkg_rules() {
    2.25 -	mkdir -p $fs/usr/share/rox-filer
    2.26 -	cp -r $install/* $fs/usr/share/rox-filer/
    2.27 -
    2.28 -	strip -s $fs/usr/share/rox-filer/* || true
    2.29 -	DEPENDS="rox-filer"
    2.30 -}
     3.1 Binary file rox-filer/.icon.png has changed
     4.1 --- a/rox-filer/receipt	Sat Nov 03 03:56:00 2018 +0200
     4.2 +++ b/rox-filer/receipt	Sat Nov 03 04:01:01 2018 +0200
     4.3 @@ -1,75 +1,81 @@
     4.4 -# SliTaz package receipt.
     4.5 +# SliTaz package receipt v2.
     4.6  
     4.7  PACKAGE="rox-filer"
     4.8 -VERSION="2.8"
     4.9 +VERSION="2.11"
    4.10  CATEGORY="system-tools"
    4.11 -SHORT_DESC="User friendly filer"
    4.12 +SHORT_DESC="Simple graphical file manager"
    4.13  MAINTAINER="devel@slitaz.org"
    4.14  LICENSE="GPL2"
    4.15 -WEB_SITE="http://rox.sourceforge.net/desktop/"
    4.16 +WEB_SITE="http://rox.sourceforge.net/desktop/ROX-Filer"
    4.17  
    4.18  TARBALL="$PACKAGE-$VERSION.tar.bz2"
    4.19  WGET_URL="$SF_MIRROR/rox/$TARBALL"
    4.20  
    4.21  BUILD_DEPENDS="libglade-dev libxml2-dev gtk2-dev shared-mime-info-dev \
    4.22 -xorg-libSM-dev"
    4.23 +xorg-libSM-dev symlinks"
    4.24 +SPLIT="$PACKAGE-default-icons $PACKAGE-locales $PACKAGE"
    4.25  
    4.26  compile_rules() {
    4.27  	export LDFLAGS="$LDFLAGS -Wl,--copy-dt-needed-entries -lm"
    4.28 -	echo "compile"
    4.29 -	# If missing dep compile will block on a read.
    4.30 -	echo -e "\t" | $src/ROX-Filer/AppRun --compile
    4.31 -	echo "mkdir"
    4.32 -	mkdir $install
    4.33 -	cp $src/ROX-Filer/ROX-Filer $install/rox-filer
    4.34 -	cp $src/ROX-Filer/.DirIcon $install/
    4.35  
    4.36 -	mkdir $install/Messages
    4.37 -	for locale in de es fr it
    4.38 -	do
    4.39 -		cp -r $src/ROX-Filer/Messages/$locale $install/Messages
    4.40 -	done
    4.41 -		
    4.42 -	cp -r $src/ROX-Filer/images $install/
    4.43 +	# it wants to "Press Return" on error, emulate it with "echo"
    4.44 +	echo | ./ROX-Filer/AppRun --compile || return 1
    4.45  
    4.46 -	mkdir $install/Help
    4.47 -	cp $src/ROX-Filer/Help/*.html $install/Help/
    4.48 -	cp $src/ROX-Filer/style.css $install/
    4.49 +	install -Dm755 $stuff/rox-filer $install/usr/bin/rox-filer
    4.50 +	ln      -s     rox-filer        $install/usr/bin/rox
    4.51 +	install -Dm755 $stuff/menu.sh   $install/usr/lib/openbox/rox-open-folder-menu.sh
    4.52  
    4.53 -	cp $src/ROX-Filer/Options.xml $install/
    4.54 -	cp $src/ROX-Filer/Templates.glade $install/
    4.55 +	dir="$install/usr/share/rox-filer"
    4.56 +	mkdir -p $dir/Help
    4.57 +
    4.58 +	# Executable
    4.59 +	install -Dm755 ROX-Filer/ROX-Filer $dir
    4.60 +
    4.61 +	# Help
    4.62 +	cp ROX-Filer/Help/*.html  $dir/Help/
    4.63 +	cp ROX-Filer/style.css    $dir/
    4.64 +
    4.65 +	# Icons
    4.66 +	mkdir -p $install/usr/share/icons/
    4.67 +	cp -r ROX-Filer/ROX/ $install/usr/share/icons/
    4.68 +	chown -R 0:0 $install/usr/share/icons/
    4.69 +	find $install/usr/share/icons/ -type f -exec chmod 644 '{}' \;
    4.70 +	$stuff/symdup.sh # symlink duplicated icons
    4.71 +
    4.72 +	# Misc
    4.73 +	cp ROX-Filer/.DirIcon     $dir/
    4.74 +	cp ROX-Filer/Options.xml  $dir/
    4.75 +	cp ROX-Filer/Templates.ui $dir/
    4.76 +	cp -r ROX-Filer/images/   $dir/
    4.77 +
    4.78 +	# Translations
    4.79 +	mkdir -p $install/usr/share/locale/
    4.80 +	cp -r ROX-Filer/Messages/* $install/usr/share/locale/
    4.81 +	rm $install/usr/share/locale/README
    4.82 +	ln -s ../locale $dir/Messages
    4.83 +
    4.84 +	cook_pick_manpages rox.1
    4.85  }
    4.86  
    4.87  genpkg_rules() {
    4.88 -	mkdir -p $fs/usr/share/rox-filer
    4.89 -	cp -r $install/* $fs/usr/share/rox-filer/
    4.90 -	cp $install/.DirIcon $fs/usr/share/rox-filer/
    4.91 -
    4.92 -	mkdir -p $fs/usr/bin
    4.93 -	cp -r $stuff/rox-filer $fs/usr/bin/
    4.94 -	ICI=$(pwd)
    4.95 -		cd $fs/usr/bin/
    4.96 -		ln -s rox-filer rox
    4.97 -	cd $ICI
    4.98 -
    4.99 -	mkdir -p $fs/usr/lib/openbox
   4.100 -	cp $stuff/rox-open-folder-menu.sh $fs/usr/lib/openbox/
   4.101 -
   4.102 -	strip -s $fs/usr/share/rox-filer/rox-filer
   4.103 -	DEPENDS="gtk2 libglade libxml2 xorg-libXdamage shared-mime-info xorg-libSM"
   4.104 -	TAGS="file-manager"
   4.105 +	case $PACKAGE in
   4.106 +		*-default-icons)
   4.107 +			copy icons/
   4.108 +			DEPENDS="rox-filer"
   4.109 +			CAT="misc|default icons"
   4.110 +			DEPENDS="rox-filer"
   4.111 +			;;
   4.112 +		*-locales)
   4.113 +			copy *.mo Messages
   4.114 +			CAT="localization|locales"
   4.115 +			DEPENDS="rox-filer"
   4.116 +			;;
   4.117 +		*)
   4.118 +			copy @std @rm
   4.119 +			DEPENDS="gdk-pixbuf glib gtk2 libglade libxml2 pango xorg-libICE \
   4.120 +			xorg-libSM xorg-libX11   shared-mime-info"
   4.121 +			SUGGESTED="rox-filer-default-icons rox-filer-locales"
   4.122 +			TAGS="file-manager"
   4.123 +			;;
   4.124 +	esac
   4.125  }
   4.126 -
   4.127 -# Check /usr/share/icons/ROX
   4.128 -post_install() {
   4.129 -	if [ -e "$1/usr/share/icons/ROX" ]; then
   4.130 -		echo ""
   4.131 -		echo "/usr/share/icons/ROX exists"
   4.132 -	else
   4.133 -		echo ""
   4.134 -		echo "/usr/share/icons/ROX doesn't exists"
   4.135 -		echo -n "linking /usr/share/icons/ROX to /usr/share/icons/Tango"
   4.136 -		ln -s /usr/share/icons/Tango "$1/usr/share/icons/ROX"
   4.137 -		status
   4.138 -	fi
   4.139 -}
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/rox-filer/stuff/menu.sh	Sat Nov 03 04:01:01 2018 +0200
     5.3 @@ -0,0 +1,28 @@
     5.4 +#!/bin/sh
     5.5 +#
     5.6 +# Openbox pipe menu to launch rox-filer using GTK bookmarks.
     5.7 +#
     5.8 +
     5.9 +cat <<EOT
    5.10 +<openbox_pipe_menu>
    5.11 +	<item label="Home">
    5.12 +		<action name="Execute">
    5.13 +			<execute>rox-filer ~</execute>
    5.14 +		</action>
    5.15 +	</item>
    5.16 +EOT
    5.17 +
    5.18 +
    5.19 +# GTK bookmarks
    5.20 +for dir in $(sed 's/[ ][^ ]*$//' .gtk-bookmarks | sed 's!file://!!'); do
    5.21 +	label=$(basename $dir)
    5.22 +	cat <<EOT
    5.23 +	<item label="$label">
    5.24 +		<action name="Execute">
    5.25 +			<execute>rox-filer $dir</execute>
    5.26 +		</action>
    5.27 +	</item>
    5.28 +EOT
    5.29 +done
    5.30 +
    5.31 +echo '</openbox_pipe_menu>'
     6.1 --- a/rox-filer/stuff/rox-filer	Sat Nov 03 03:56:00 2018 +0200
     6.2 +++ b/rox-filer/stuff/rox-filer	Sat Nov 03 04:01:01 2018 +0200
     6.3 @@ -1,6 +1,5 @@
     6.4  #!/bin/sh
     6.5  
     6.6 -APP_DIR="/usr/share/rox-filer/"
     6.7 -export APP_DIR
     6.8 +export APP_DIR="/usr/share/rox-filer/"
     6.9  
    6.10  /usr/share/rox-filer/rox-filer $@
     7.1 --- a/rox-filer/stuff/rox-filer.desktop	Sat Nov 03 03:56:00 2018 +0200
     7.2 +++ b/rox-filer/stuff/rox-filer.desktop	Sat Nov 03 04:01:01 2018 +0200
     7.3 @@ -1,11 +1,21 @@
     7.4  [Desktop Entry]
     7.5 -Encoding=UTF-8
     7.6 -Name=rox-filer
     7.7 -Name[fr]=gestionnaire de fichiers rox
     7.8 +Type=Application
     7.9 +Name=ROX-Filer
    7.10 +Comment=A graphical file manager
    7.11 +Comment[de]=Ein grafischer Dateimanager
    7.12 +Comment[es]=Un gestor de archivos gráafico
    7.13 +Comment[fr]=Un gestionnaire de fichiers graphique
    7.14 +Comment[gl]=Xestor gráafico de arquivos
    7.15 +Comment[hu]=Egy grafikus fájlkezelő
    7.16 +Comment[it]=File manager grafico
    7.17 +Comment[nl]=Een grafisch bestandsbeheerprogramma
    7.18 +Comment[pl]=Graficzny manager plików
    7.19 +Comment[ru]=Графический файловый менеджер
    7.20 +Comment[zh_CN]=文件管理员
    7.21 +Comment[zh_TW]=檔案管理員
    7.22 +StartupNotify=true
    7.23 +Terminal=false
    7.24  Exec=rox-filer %F
    7.25  Icon=pcmanfm
    7.26 -StartupNotify=true
    7.27 -Type=Application
    7.28 -Terminal=false
    7.29 +Categories=System;Core;GTK;
    7.30  MimeType=x-directory/normal;inode/directory;
    7.31 -Categories=Application;System;Utility;Core;GTK;
     8.1 --- a/rox-filer/stuff/rox-open-folder-menu.sh	Sat Nov 03 03:56:00 2018 +0200
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,25 +0,0 @@
     8.4 -#!/bin/sh
     8.5 -#
     8.6 -# Openbox pipe menu to launch rox-filer using GTK bookmarks.
     8.7 -#
     8.8 -
     8.9 -echo '<openbox_pipe_menu>'
    8.10 -
    8.11 -# Home
    8.12 -echo '<item label="Home">'
    8.13 -echo '<action name="Execute"><execute>'
    8.14 -echo "rox-filer ~"
    8.15 -echo '</execute></action></item>'
    8.16 -
    8.17 -
    8.18 -
    8.19 -# GTK bookmarks
    8.20 -for dir in `sed 's/[ ][^ ]*$//' .gtk-bookmarks | sed 's!file://!!'`
    8.21 -do
    8.22 -	echo '<item label="'`basename $dir`'">'
    8.23 -	echo '<action name="Execute"><execute>'
    8.24 -	echo "rox-filer $dir"
    8.25 -	echo '</execute></action></item>'
    8.26 -done
    8.27 -
    8.28 -echo '</openbox_pipe_menu>'
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/rox-filer/stuff/symdup.sh	Sat Nov 03 04:01:01 2018 +0200
     9.3 @@ -0,0 +1,23 @@
     9.4 +# substitute repeated files by symlinks
     9.5 +md5file=$(mktemp)
     9.6 +find $install -type f -exec md5sum {} \; | sort > $md5file
     9.7 +
     9.8 +for md in $(uniq -d -w32 $md5file | cut -c1-32); do
     9.9 +	# group of similar files
    9.10 +	similar="$(grep $md $md5file | cut -c35-)"
    9.11 +
    9.12 +	# find shortest filename
    9.13 +	shortest=$(echo "$similar" | cut -d' ' -f1)
    9.14 +	for line in $(echo $similar); do
    9.15 +		[ "${#line}" -lt "${#shortest}" ] && shortest="$line"
    9.16 +	done
    9.17 +
    9.18 +	# make symlinks to the file with shortest filename
    9.19 +	for file in $similar; do
    9.20 +		[ "$shortest" != "$file" ] && ln -sf $shortest $file
    9.21 +	done
    9.22 +done
    9.23 +rm "$md5file"
    9.24 +
    9.25 +# make all symlinks relative
    9.26 +symlinks -crs $install