LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-10-2011, 08:58 AM   #1
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Rep: Reputation: 125Reputation: 125
.SlackBuild request for DoubleCMD


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.
Old 11-10-2011, 09:41 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
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
 
2 members found this post helpful.
Old 11-10-2011, 09:44 AM   #3
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
This should be the HOWTO to create a SlackBuild: http://www.slackwiki.com/Writing_A_SlackBuild_Script

(the link on the slackbuilds.org page link to slackwiki.org which is no longer registered.
 
1 members found this post helpful.
Old 11-10-2011, 09:47 AM   #4
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Original Poster
Rep: Reputation: 125Reputation: 125
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.
 
Old 11-10-2011, 09:57 AM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
the slackwiki.com (not .org) domain works fine, try the link vharishankar posted.
 
Old 11-10-2011, 10:37 AM   #6
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Original Poster
Rep: Reputation: 125Reputation: 125
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.
 
Old 11-10-2011, 12:23 PM   #7
solarfields
Senior Member
 
Registered: Feb 2006
Location: slackalaxy.com
Distribution: Slackware, CRUX
Posts: 1,449

Rep: Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997Reputation: 997
Totoro-kun

you may give src2pkg a try http://www.src2pkg.net/
 
Old 11-10-2011, 12:24 PM   #8
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
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:
Eric
 
1 members found this post helpful.
Old 11-10-2011, 02:38 PM   #9
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Totoro-kun View Post
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 can always download a "portable package" : http://doublecmd.sourceforge.net/
 
1 members found this post helpful.
Old 11-10-2011, 06:12 PM   #10
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
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
 
1 members found this post helpful.
Old 11-10-2011, 06:56 PM   #11
koenigdavidmj
Member
 
Registered: Oct 2009
Posts: 73

Rep: Reputation: 25
[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?
 
Old 11-11-2011, 02:02 AM   #12
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,557

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
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:

Code:
wget -P /tmp http://download.opensuse.org/repositories/home:/Alexx2000/Mandriva_2010.1/i586/doublecmd-gtk-0.5.1-2.2.i586.rpm http://download.opensuse.org/repositories/home:/Alexx2000/Mandriva_2010.1/noarch/doublecmd-help-en-0.5.0-6.1.noarch.rpm
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

Code:
update-desktop-database -q /usr/share/applications

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
 
1 members found this post helpful.
Old 11-11-2011, 02:35 AM   #13
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Original Poster
Rep: Reputation: 125Reputation: 125
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Request for 13.37: Change to slrn slackbuild andrew.46 Slackware 2 03-13-2011 12:21 AM
Bad Request Your browser sent a request that this server could not understand. vishnukumar Linux - Server 2 08-13-2009 12:56 AM
*.SlackBuild SolitudeSensus Programming 3 07-17-2009 11:50 PM
webserver doesn't reply to external request but it reply's to local request ziba Linux - Server 4 05-11-2009 05:27 PM
SlackBuild CrEsPo Slackware 2 03-19-2006 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration