CMake is new territory for me - Trying to install kdebluetooth4
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.
offers a lot of instructions that do not resemble what I have. I downloaded the kdebluetooth4-0.3.tar.bz2 and extracted it to my home directory. It created the expected kdebluetooth4 directory, but there is no readme to explain installation. The directory contains this:
Quote:
AUTHORS CMakeFiles/ COPYING TODO inputwizard/
CMakeCache.txt CMakeLists.txt ChangeLog icons/ src/
Would someone familiar with cmake give me a starting clue on how to install it?
Thanks in advance
Bob
Last edited by BobNutfield; 06-16-2009 at 02:10 PM.
Cmake isn't too hard. You just have to relearn all the config stuff again, kinda. So if you want something like prefix=/usr, you have to use -DCMAKE_INSTALL_PREFIX=/usr instead of --prefix=/usr like you would with a configure script. After that, it's the same. Just make and make install. Here is a sample slackbuild I made for crystal windeco that uses cmake. You should be able to modify it for you app.
Code:
#!/bin/sh
# Slackware build script for Crystal window decoration for KDE4
# Written by Allen Coleman (acisapunkster at gmail.com)
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS 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 AUTHOR 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.
PRGNAM=crystal
VERSION=${VERSION:-2.0.3}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_acc}
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 jxvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/usr/lib${LIBDIRSUFFIX} \
..
make
make install DESTDIR=$PKG
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
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.tgz
Last edited by manwichmakesameal; 06-16-2009 at 03:13 PM.
CMAKE_BACKWARDS_COMPATIBILITY: For backwards compatibility, what version of CMak
Press [enter] to edit option CMake Version 2.6 - patch 2
Press [c] to configure
Press [h] for help Press [q] to quit without generating
Press [t] to toggle advanced mode (Currently Off)
When I choose <c> for configure, I get this error:
Quote:
CMake Error at inputwizard/CMakeLists.txt:17 (kde4_add_ui_files):
Unknown CMake command "kde4_add_ui_files".
I think I am going to have to either study the cmake documentation a lot more before I delve into this or find a normal source file for kdebluetooth4-0.3.
Yes, that is what I thought, but when I do cd into the extracted kdebluetooth4-0.3 directory, run cmake, it is returning a long list of options. It is looking for an option or target after cmake. That is where I get lost. There is no obvious target and one of the options is to generate a makefile, which is also not present.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.6)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
I am beginning consider just living without bluetooth in Slack.
Inside the new kdeblutooth directory, create a new directory and call it build. You can name it anything you want, however. Change into that directory, and issue this command:
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ../
$ make
# make install
That's the fast way. If you want to make a Slackware Package, do it this way:
Make a new directory in your home directory, and call it slackpkg.
Go back into /kdebluetooth4/build and do it this way:
$ cmake -DCMAKE_INSTALL_PREFIX=/home/BobNutfield/slackpkg
$ make
$ make install
Change into the slackpkg directory and issue this command:
# makepkg -l y -c y /tmp/kdebluetooth-4.0.3-i486-Bob.tgz
# installpkg /tmp/kdebluetooth-4.0.3-i486-Bob.tgz
Done - and I just tested this, but I don't have Bluetooth, so that's as far as I can go.
There may be something messed up with your config for cmake. I'm not sure where it's at though. I just dl'd kdebluetooth and cmake configured it ok. If you are running -current64, I can build it and put up the binary pkg.
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.6)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
CMake Error: Unable to open cache file for save. /home/bob/kdebluetooth4-0.3/CMakeCache.txt
CMake Error: : System Error: Permission denied
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.6)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
There may be something messed up with your config for cmake. I'm not sure where it's at though. I just dl'd kdebluetooth and cmake configured it ok. If you are running -current64, I can build it and put up the binary pkg.
Thank you that very kind, but I am running -current32. It is not hugely important that I get this installed. I triple boot this laptop with Fedora and Ubuntu and bluetooth works fine in both of them. If I need it I suppose I can just go there. But, since I have upgraded to Slack current and with the latest upgrades to xorg and mesa, I have the PERFECT laptop now, so I spend ALL of my time in Slack now. It just would have been convenient to have it is all. I might investigate another method of getting bluetooth to work without a KDE gui.
Well, rats. I am using Slackware64-current, with all updates. I didn't think it would be much different. Sorry.
Thank you for your time. I don't think it would have been different on my 32bit machine. I am convinced there is something wrong with the file I downloaded. It really is no big deal. I can connect from the command line with hcitool, but I guess I was being lazy and wanted a GUI for the job. But a no big deal. I will try it again some other time. I'm sure there will be a Slack build for it sooner or later.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.