SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello fellow slackers,
I have found a nice program called DoubleCMD which is the closest I have seen to commercial TotalCMD for windows. And apart mc, I have been waiting for such app to appear in Linux world for ages. Now it has appeared, but I am not good at writing .SlackBuilds so I would like to ask for someone also interested in this application, to share a .SlackBuild with me. If it is not too much trouble of course.
Many thanks,
Egidijus
Click here to see the post LQ members have rated as the most helpful post in this thread.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150
Rep:
Why not follow this:http://slackbuilds.org/howto/ and make one yourself it's quite easy and will stand you in good stead for the future, go on give it a try
Thank you for a suggestion, I am sure, I will have to learn this sooner or later, but at the moment the time is tight on me, plus if i click on writing howto, I only get empty white page of Slackwiki.org with the link to Legal terms in the center, which leads to another empty white page. Weird.
Just did a quick try, omg this stuff is totally not for me I think I've got same chance to learn writing SlackBuilds as 99 year old man to learn ballet I am sorry, but I'll definitely need someones favor with this SlackBuild.
The stuff needs a pascal compiler, so that is where I stopped creating a real package... but if you get the SlackBuild scripts for fpc and lazarus from http://slackbuilds.org you can use the following SlackBuild as a starter (no guarantees, but it should work according to the installation instructions):
Code:
#!/bin/sh
# $Id: doublecmd.SlackBuild,v 1.1 2011/11/10 18:18:48 root Exp root $
# Copyright 2011 Eric Hameleers, Eindhoven, NL
# 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: Eric Hameleers <alien@slackware.com>
# For: doublecmd
# Descr: file manager with two panels side by side
# URL: http://doublecmd.sourceforge.net/
# Needs: fpc, lazarus (only at build-time)
# Changelog:
# 0.5.1-1: 10/Nov/2011 by Eric Hameleers <alien@slackware.com>
# * Initial build.
#
# Run 'sh doublecmd.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=doublecmd
VERSION=${VERSION:-0.5.1}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:" -j4 "}
TAG=${TAG:-alien}
DOCS="doc/*.txt"
# 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}
SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
SRCURL="http://downloads.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}-src.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 "++"
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .
echo Building ...
export LDFLAGS="$SLKLDFLAGS"
export CXXFLAGS="$SLKCFLAGS"
export CFLAGS="$SLKCFLAGS"
# Also install the help files:
chmod +x install/linux/install-help.sh
./build.sh all gtk2 \
2>&1 | tee $OUTPUT/make-${PRGNAM}.log
install/linux/install.sh --install-prefix=$PKG \
2>&1 | tee $OUTPUT/install-${PRGNAM}.log
install/linux/install-help.sh --install-prefix=$PKG \
2>&1 | tee -a $OUTPUT/install-${PRGNAM}.log
# Add this to the doinst.sh:
mkdir -p $PKG/install
cat <<EOINS >> $PKG/install/doinst.sh
# Update the desktop database:
if [ -x usr/bin/update-desktop-database ]; then
chroot . /usr/bin/update-desktop-database usr/share/applications > /dev/null 2>&1
fi
# Update hicolor theme cache:
if [ -d usr/share/icons/hicolor ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null
fi
fi
# Update the mime database:
if [ -x usr/bin/update-mime-database ]; then
chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
EOINS
# 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
# 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
# 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_}
With this as the slack-desc file:
Code:
# 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 ':'.
|-----handy-ruler------------------------------------------------------|
doublecmd: doublecmd (file manager with two panels side by side)
doublecmd:
doublecmd: Double Commander is a cross platform open source file manager with
doublecmd: two panels side by side. It is inspired by Total Commander and
doublecmd: features some new ideas.
doublecmd:
doublecmd:
doublecmd:
doublecmd:
doublecmd: doublecmd home: http://doublecmd.sourceforge.net/
doublecmd:
Just did a quick try, omg this stuff is totally not for me I think I've got same chance to learn writing SlackBuilds as 99 year old man to learn ballet I am sorry, but I'll definitely need someones favor with this SlackBuild.
You could also use Alien BOB's SlackBuild generator: http://alien.slackbook.org/AST/
I guess thats what he used to create the above scripts.
Although it works fine it hardly ever gets mentioned
[QUOTE=Alien Bob;4520878]The stuff needs a pascal compiler, so that is where I stopped creating a real package... but if you get the SlackBuild scripts for fpc and lazarus from http://slackbuilds.org you can use the following SlackBuild as a starter (no guarantees, but it should work according to the installation instructions):
Slackware comes with p2c, a Pascal-to-C converter. Any chance that that would work for this?
If you are feeling really lazy and can't be bothered with the SlackBuild right now, you could quickly repackage one of the binary packages they provide for another disto. The Double Commander download page has an "openSUSE Build Service" link with several rpms. I just did the following on 32-bit Slackware 13.37 and it seemed to work fine for me.
Download the Mandriva packages to your /tmp directory:
Switch to root and issue the following (assuming your use a Bourne compatible shell) to repackage to Slackware format (copy and paste it into the terminal if you like):
Code:
mkdir -p /tmp/doublecmd-repack/{install,usr/doc}
cd /tmp/doublecmd-repack
rpm2cpio /tmp/doublecmd-gtk-0.5.1-2.2.i586.rpm | cpio -id
rpm2cpio /tmp/doublecmd-help-en-0.5.0-6.1.noarch.rpm | cpio -id
mv usr/share/doublecmd/doc usr/doc/doublecmd-gtk-0.5.1
( cd usr/lib/doublecmd ; ln -sf ../../doc/doublecmd-gtk-0.5.1 doc )
cat << EOD > install/slack-desc
doublecmd-gtk: doublecmd-gtk (Twin-panel commander-style file manager, Gtk2 version)
doublecmd-gtk:
doublecmd-gtk: Double Commander is a cross platform open source file manager with two
doublecmd-gtk: panels side by side. It is inspired by Total Commander and features
doublecmd-gtk: some new ideas.
doublecmd-gtk:
doublecmd-gtk:
doublecmd-gtk:
doublecmd-gtk:
doublecmd-gtk: http://doublecmd.sourceforge.net/
doublecmd-gtk:
EOD
makepkg -l y -c n /tmp/doublecmd-gtk-0.5.1-i586-1ro.tgz
Now you can go ahead and install:
Code:
installpkg /tmp/doublecmd-gtk-0.5.1-i586-1ro.tgz
After I did this Double Commander showed up for me under Xfce's applications menu in "Accessories" and it seemed to start and run without issues.
P.S. If "Double Commander" doesn't appear in your applications menu under your Desktop Environment immediately, then issue the following as root
Last edited by ruario; 11-11-2011 at 07:44 AM.
Reason: corrected doc location; fixed update-desktop-database command which was missing a /; simplified and added a slack-desc
Good morning,
Wanted to thank you all for help, I have tried Alien Bob suggestions, installed fpc and lazarus from slackbuilds.org, then tried SlackBuild, and it worked well , I now have a package of DoubleCMD and my Linux feels complete now
Many many thanks to all who took time to help.
P.S.
I think comparing my ability to learn SlackBuilds, to 99 year old, was a bit rushed. Given some quality time with them, I might learn a thing or two after all, so I'll give it a shot sometime soon, but probably with a program little bit easier than DoubleCMD
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.