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.
#!/bin/sh
# Slackware build script for libftdi
# Copyright 2013 Willy Sudiarto Raharjo <willysr@slackware-id.org>
# All rights reserved.
#
# 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=libftdi
VERSION=${VERSION:-0.19}
BUILD=${BUILD:-1wsr}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/build}
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"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
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" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-python-binding \
--disable-static \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING* ChangeLog LICENSE README* \
$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.${PKGTYPE:-txz}
slack-desc
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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
libftdi: libftdi (FTDI USB driver)
libftdi:
libftdi: A library (using libusb) to talk to FTDI's UART/FIFO chips
libftdi: including the popular bitbang mode
libftdi:
libftdi:
libftdi: Project URL: http://www.intra2net.com/en/developer/libftdi
libftdi:
/usr/share/aclocal/imlib.m4:9: warning: underquoted definition of AM_PATH_IMLIB
When I do ./autogen.sh
What is that?
that's because imlib and aalib look unmaintained upstream, so you will have those warning each time you run autogen.sh.
if those get annoying for you, run these seds as root
Code:
sed -i 's|AC_DEFUN(AM_PATH_IMLIB|AC_DEFUN([AM_PATH_IMLIB]|' /usr/share/aclocal/imlib.m4
sed -i 's|AC_DEFUN(AM_PATH_GDK_IMLIB|AC_DEFUN([AM_PATH_GDK_IMLIB]|' /usr/share/aclocal/imlib.m4
sed -i 's|AC_DEFUN(AM_PATH_AALIB|AC_DEFUN([AM_PATH_AALIB]|' /usr/share/aclocal/aalib.m4
#!/bin/sh
# Slackware build script for libftdi
# Copyright 2013 Willy Sudiarto Raharjo <willysr@slackware-id.org>
# All rights reserved.
#
# 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=libftdi
VERSION=${VERSION:-0.19}
BUILD=${BUILD:-1wsr}
If you read my post you would have know I have already installed that version, I took the script from the page I mention in post #1 and then I use the compress file from the Original source, I think that is all explain in the first post. no? Thank for you input anyway.
git clone https://github.com/texane/stlink.git
./autogen.sh
./configure
make
mkdir /tmp/test
make install DESTDIR=/tmp/test
cd /tmp/test
makepkg -l y -c n /tmp/stlinkv2-SVN1183-i686-1.tgz
installpkg /tmp/stlinkv2-SVN1183-i686-1.tgz
Thanks BroX true if I dont move the directory if grap the whole thing, dropping the files on the wrong place.
Now The problem I have is the make install is not moving the right folder.
maybe I dont ment to have them inside the package?
How I have the time to look a bit more into libftdi lasted version and this is done by Cmake. I went to Cmake website and it does not seen to have many information about the config for the Cmake. I went to http://www.cmake.org.
Before I start I have a question when I use "makepkg" should I mean to move the compress files to a specific location like opt and leave them there? I though the idea to have then in a package is like you dont need anything more that all inside the package and taking into account update that just removing the package will remove all the files.
OK now of what I have done today but I still not getting it right.
Download the version 1-1.0 from the official, move to a folder, decompress, go in it and
and run in Terminal:
cmake -DCMAKE_INSTALL_PREFIX="/usr"
In the original file say something like:
cmake -DCMAKE_INSTALL_PREFIX="/usr" ../
But that does not work. I think it mean to say setting the other flags but I dont know how to do it, that is why I went to their website but not much there.
This the terminal output:
Quote:
bash-4.2# cmake -DCMAKE_INSTALL_PREFIX="/usr" ../
CMake Error: The source directory "/home/bla bla bla" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
bash-4.2# cmake -DCMAKE_INSTALL_PREFIX="/usr"
-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is GNU 4.7.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build type: RelWithDebInfo
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.25")
-- checking for module 'libusb-1.0'
-- found libusb-1.0, version 1.0.9
-- Found LIBUSB: /usr/lib/libusb-1.0.so
-- Boost version: 1.49.0
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.1.1")
-- Doxygen found.
-- Generating API documentation with Doxygen
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
-- Detected git snapshot version: unknown
-- Building libftdi1++
-- Found SWIG: /usr/bin/swig (found version "2.0.6")
-- Found PythonLibs: /usr/lib/libpython2.7.so (found version "2.7.3")
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
-- Building python bindings via swig. Will be installed under
-- checking for module 'libconfuse'
-- found libconfuse, version 2.6
-- Building ftdi_eeprom
-- Building example programs.
-- Building libftdi++ examples.
-- Boost version: 1.49.0
-- Found the following Boost libraries:
-- unit_test_framework
-- Building unit test
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bla bla bal
make a pause here:
What mean by:"
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
"
Carry on:
I went to look at CMakeList.txt and it looks like the replace for ./config file. Right?
Now I run make:
I get output terminal:
Quote:
bash-4.2# make
Scanning dependencies of target docs
[ 4%] Generating doc/html/index.html
warning: ignoring unsupported tag `AUTOLINK_SUPPORT =' at line 260, file /home/bla bla bla/Doxyfile
warning: ignoring unsupported tag `HTML_EXTRA_STYLESHEET =' at line 919, file /home/bal bla bla/Doxyfile
[ 4%] Built target docs
Scanning dependencies of target ftdi1
[ 8%] Building C object src/CMakeFiles/ftdi1.dir/ftdi.c.o
[ 12%] Building C object src/CMakeFiles/ftdi1.dir/ftdi_stream.c.o
Linking C shared library libftdi1.so
[ 12%] Built target ftdi1
Scanning dependencies of target ftdi1-static
[ 16%] Building C object src/CMakeFiles/ftdi1-static.dir/ftdi.c.o
[ 20%] Building C object src/CMakeFiles/ftdi1-static.dir/ftdi_stream.c.o
Linking C static library libftdi1.a
[ 20%] Built target ftdi1-static
Scanning dependencies of target ftdipp1
[ 24%] Building CXX object ftdipp/CMakeFiles/ftdipp1.dir/ftdi.cpp.o
Linking CXX shared library libftdipp1.so
[ 24%] Built target ftdipp1
Scanning dependencies of target ftdipp1-static
[ 28%] Building CXX object ftdipp/CMakeFiles/ftdipp1-static.dir/ftdi.cpp.o
Linking CXX static library libftdipp1.a
[ 28%] Built target ftdipp1-static
Scanning dependencies of target doc_i
[ 32%] Generating ../doc/xml/ftdi_8c.xml
warning: ignoring unsupported tag `AUTOLINK_SUPPORT =' at line 264, file Doxyfile
warning: ignoring unsupported tag `HTML_EXTRA_STYLESHEET =' at line 923, file Doxyfile
[ 36%] Generating ftdi1_doc.i
[ 36%] Built target doc_i
[ 40%] Swig source
Scanning dependencies of target _ftdi1
[ 44%] Building C object bindings/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c.o
/home/bla bla bla/bindings/ftdi1PYTHON_wrap.c: In function 'init_ftdi1':
/home/pedro/bla bla bla/bindings/ftdi1PYTHON_wrap.c:11497:21: warning: variable 'md' set but not used [-Wunused-but-set-variable]
Linking C shared module _ftdi1.so
[ 44%] Built target _ftdi1
Scanning dependencies of target ftdi_eeprom
[ 48%] Building C object ftdi_eeprom/CMakeFiles/ftdi_eeprom.dir/main.c.o
Linking C executable ftdi_eeprom
[ 48%] Built target ftdi_eeprom
Scanning dependencies of target baud_test
[ 52%] Building C object examples/CMakeFiles/baud_test.dir/baud_test.c.o
Linking C executable baud_test
[ 52%] Built target baud_test
Scanning dependencies of target bitbang
[ 56%] Building C object examples/CMakeFiles/bitbang.dir/bitbang.c.o
Linking C executable bitbang
[ 56%] Built target bitbang
Scanning dependencies of target bitbang2
[ 60%] Building C object examples/CMakeFiles/bitbang2.dir/bitbang2.c.o
Linking C executable bitbang2
[ 60%] Built target bitbang2
Scanning dependencies of target bitbang_cbus
[ 64%] Building C object examples/CMakeFiles/bitbang_cbus.dir/bitbang_cbus.c.o
Linking C executable bitbang_cbus
[ 64%] Built target bitbang_cbus
Scanning dependencies of target bitbang_ft2232
[ 68%] Building C object examples/CMakeFiles/bitbang_ft2232.dir/bitbang_ft2232.c.o
Linking C executable bitbang_ft2232
[ 68%] Built target bitbang_ft2232
Scanning dependencies of target eeprom
[ 72%] Building C object examples/CMakeFiles/eeprom.dir/eeprom.c.o
Linking C executable eeprom
[ 72%] Built target eeprom
Scanning dependencies of target find_all
[ 76%] Building C object examples/CMakeFiles/find_all.dir/find_all.c.o
Linking C executable find_all
[ 76%] Built target find_all
Scanning dependencies of target find_all_pp
[ 80%] Building CXX object examples/CMakeFiles/find_all_pp.dir/find_all_pp.cpp.o
Linking CXX executable find_all_pp
[ 80%] Built target find_all_pp
Scanning dependencies of target serial_test
[ 84%] Building C object examples/CMakeFiles/serial_test.dir/serial_test.c.o
Linking C executable serial_test
[ 84%] Built target serial_test
Scanning dependencies of target simple
[ 88%] Building C object examples/CMakeFiles/simple.dir/simple.c.o
Linking C executable simple
[ 88%] Built target simple
Scanning dependencies of target stream_test
[ 92%] Building C object examples/CMakeFiles/stream_test.dir/stream_test.c.o
Linking C executable stream_test
[ 92%] Built target stream_test
Scanning dependencies of target test_libftdi1
[ 96%] Building CXX object test/CMakeFiles/test_libftdi1.dir/basic.cpp.o
[100%] Building CXX object test/CMakeFiles/test_libftdi1.dir/baudrate.cpp.o
Linking CXX executable test_libftdi1
[100%] Built target test_libftdi1
How I tell make install is a previous created folder:
As you see, it has not copy the hole thing! Maybe this way is just to tell the system where the files are going to be and install the minimum necessary?
obviously I now when to the tmp folder and from there I ran:
makepkg -l y -c n /tmp/libftdi1-1.0-i686-1.tgz
And this create a package which I have not install yet, but I will not like it here because its the same what make install move to the tmp directory plus a doinst.sh file.
I think there whole error come from the Cmake option?
#!/bin/sh
# Slackware build script for libftdi
# Copyright 2013 Willy Sudiarto Raharjo <willysr@slackware-id.org>
# All rights reserved.
#
# 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=libftdi
VERSION=${VERSION:-1.0}
BUILD=${BUILD:-1wsr}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/build}
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"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf ${PRGNAM}1-$VERSION
tar xjvf $CWD/${PRGNAM}1-$VERSION.tar.bz2
cd ${PRGNAM}1-$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 {} \;
mkdir build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING* ChangeLog LICENSE README* \
$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.${PKGTYPE:-txz}
#!/bin/sh
# Slackware build script for libftdi
# Copyright 2013 Willy Sudiarto Raharjo <willysr@slackware-id.org>
# All rights reserved.
#
# 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=libftdi
VERSION=${VERSION:-1.0}
BUILD=${BUILD:-1wsr}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/build}
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"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf ${PRGNAM}1-$VERSION
tar xjvf $CWD/${PRGNAM}1-$VERSION.tar.bz2
cd ${PRGNAM}1-$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 {} \;
mkdir build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
AUTHORS COPYING* ChangeLog LICENSE README* \
$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.${PKGTYPE:-txz}
Thanks I havent trid but it looks OK how did you do the Flags in Cmake? I Think that is what I got stuck on 0.9 version.
I checked for ${LIBDIRSUFFIX} I am guessing this is something predetermined on the cmakelist file but I did and do all the previous post above me and the file that make install move are only this:
Quote:
bash-4.2# make install DESTDIR=/tmp/libftdi1
[ 4%] Built target docs
[ 12%] Built target ftdi1
[ 20%] Built target ftdi1-static
[ 24%] Built target ftdipp1
[ 28%] Built target ftdipp1-static
[ 36%] Built target doc_i
[ 44%] Built target _ftdi1
[ 48%] Built target ftdi_eeprom
[ 52%] Built target baud_test
[ 56%] Built target bitbang
[ 60%] Built target bitbang2
[ 64%] Built target bitbang_cbus
[ 68%] Built target bitbang_ft2232
[ 72%] Built target eeprom
[ 76%] Built target find_all
[ 80%] Built target find_all_pp
[ 84%] Built target serial_test
[ 88%] Built target simple
[ 92%] Built target stream_test
[100%] Built target test_libftdi1
Install the project...
-- Install configuration: "Release"
-- Installing: /tmp/libftdi1/usr/lib/pkgconfig/libftdi1.pc
-- Installing: /tmp/libftdi1/usr/lib/pkgconfig/libftdipp1.pc
-- Installing: /tmp/libftdi1/usr/bin/libftdi1-config
-- Installing: /tmp/libftdi1/usr/lib/cmake/libftdi1/LibFTDI1Config.cmake
-- Installing: /tmp/libftdi1/usr/lib/cmake/libftdi1/UseLibFTDI1.cmake
-- Installing: /tmp/libftdi1/usr/lib/libftdi1.so.2.0.0
-- Installing: /tmp/libftdi1/usr/lib/libftdi1.so.2
-- Installing: /tmp/libftdi1/usr/lib/libftdi1.so
-- Installing: /tmp/libftdi1/usr/lib/libftdi1.a
-- Installing: /tmp/libftdi1/usr/include/libftdi1/ftdi.h
-- Installing: /tmp/libftdi1/usr/lib/libftdipp1.so.2.0.0
-- Installing: /tmp/libftdi1/usr/lib/libftdipp1.so.2
-- Installing: /tmp/libftdi1/usr/lib/libftdipp1.so
-- Removed runtime path from "/tmp/libftdi1/usr/lib/libftdipp1.so.2.0.0"
-- Installing: /tmp/libftdi1/usr/lib/libftdipp1.a
-- Installing: /tmp/libftdi1/usr/include/libftdi1/ftdi.hpp
-- Installing: /tmp/libftdi1/usr/lib/python2.7/site-packages/_ftdi1.so
-- Installing: /tmp/libftdi1/usr/lib/python2.7/site-packages/ftdi1.py
-- Installing: /tmp/libftdi1/usr/bin/ftdi_eeprom
-- Removed runtime path from "/tmp/libftdi1/usr/bin/ftdi_eeprom"
I think its leaving a lot behind right? Odiously I am not talking about the doc bla bla are make after this section.
I know I have installed lots of packages by now from the slack builds.
I already have 0.9 so its now more learning processes, if you look at my last pots I am following his slack build script but its still leaving some things behind, right?
I meant to run you package script earlier just to reconfirm but I was sure what it was doing by looking. I just didnt have time , here is the terminal terminal output it may be stooping because there is not desc file. But I looked to the build folder and it look very similar of what I was doing manually.
Quote:
bash-4.2# ./libftdi.SlackBuild
libftdi1-1.0/
libftdi1-1.0/.gitignore
libftdi1-1.0/AUTHORS
libftdi1-1.0/CMakeLists.txt
libftdi1-1.0/COPYING-CMAKE-SCRIPTS
libftdi1-1.0/COPYING.GPL
libftdi1-1.0/COPYING.LIB
libftdi1-1.0/ChangeLog
libftdi1-1.0/FindUSB1.cmake
libftdi1-1.0/LICENSE
libftdi1-1.0/LibFTDI1Config.cmake.in
libftdi1-1.0/README
libftdi1-1.0/README.build
libftdi1-1.0/README.mingw
libftdi1-1.0/TODO
libftdi1-1.0/Toolchain-Crossbuild32.cmake
libftdi1-1.0/Toolchain-mingw32.cmake
libftdi1-1.0/UseLibFTDI1.cmake
libftdi1-1.0/bindings/
libftdi1-1.0/bindings/CMakeLists.txt
libftdi1-1.0/bindings/doxy2swig.py
libftdi1-1.0/bindings/ftdi1.i
libftdi1-1.0/doc/
libftdi1-1.0/doc/Doxyfile.in
libftdi1-1.0/doc/Doxyfile.xml.in
libftdi1-1.0/doc/EEPROM-structure
libftdi1-1.0/doc/release-checklist.txt
libftdi1-1.0/examples/
libftdi1-1.0/examples/CMakeLists.txt
libftdi1-1.0/examples/baud_test.c
libftdi1-1.0/examples/bitbang.c
libftdi1-1.0/examples/bitbang2.c
libftdi1-1.0/examples/bitbang_cbus.c
libftdi1-1.0/examples/bitbang_cbus_eeprom_for_windows.ept
libftdi1-1.0/examples/bitbang_ft2232.c
libftdi1-1.0/examples/cmake_example/
libftdi1-1.0/examples/cmake_example/CMakeLists.txt
libftdi1-1.0/examples/cmake_example/main.c
libftdi1-1.0/examples/eeprom.c
libftdi1-1.0/examples/find_all.c
libftdi1-1.0/examples/find_all_pp.cpp
libftdi1-1.0/examples/python/
libftdi1-1.0/examples/python/complete.py
libftdi1-1.0/examples/python/simple.py
libftdi1-1.0/examples/serial_test.c
libftdi1-1.0/examples/simple.c
libftdi1-1.0/examples/stream_test.c
libftdi1-1.0/ftdi_eeprom/
libftdi1-1.0/ftdi_eeprom/CMakeLists.txt
libftdi1-1.0/ftdi_eeprom/example.conf
libftdi1-1.0/ftdi_eeprom/ftdi_eeprom_version.h.in
libftdi1-1.0/ftdi_eeprom/main.c
libftdi1-1.0/ftdipp/
libftdi1-1.0/ftdipp/CMakeLists.txt
libftdi1-1.0/ftdipp/ftdi.cpp
libftdi1-1.0/ftdipp/ftdi.hpp
libftdi1-1.0/libftdi-1.0.kdev4
libftdi1-1.0/libftdi.lnt
libftdi1-1.0/libftdi1-config.in
libftdi1-1.0/libftdi1.pc.in
libftdi1-1.0/libftdi1.spec.in
libftdi1-1.0/libftdipp1.pc.in
libftdi1-1.0/packages/
libftdi1-1.0/packages/99-libftdi.rules
libftdi1-1.0/packages/CMakeLists.txt
libftdi1-1.0/src/
libftdi1-1.0/src/CMakeLists.txt
libftdi1-1.0/src/ftdi.c
libftdi1-1.0/src/ftdi.h
libftdi1-1.0/src/ftdi_i.h
libftdi1-1.0/src/ftdi_stream.c
libftdi1-1.0/src/ftdi_version_i.h.in
libftdi1-1.0/test/
libftdi1-1.0/test/CMakeLists.txt
libftdi1-1.0/test/basic.cpp
libftdi1-1.0/test/baudrate.cpp
-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is GNU 4.7.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Build type: Release
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.25")
-- checking for module 'libusb-1.0'
-- found libusb-1.0, version 1.0.9
-- Found LIBUSB: /usr/lib/libusb-1.0.so
-- Boost version: 1.49.0
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.1.1")
-- Doxygen found.
-- Generating API documentation with Doxygen
fatal: Not a git repository (or any of the parent directories): .git
-- Detected git snapshot version: unknown
-- Building libftdi1++
-- Found SWIG: /usr/bin/swig (found version "2.0.6")
-- Found PythonLibs: /usr/lib/libpython2.7.so (found version "2.7.3")
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
-- Building python bindings via swig. Will be installed under
-- checking for module 'libconfuse'
-- found libconfuse, version 2.6
-- Building ftdi_eeprom
-- Building example programs.
-- Building libftdi++ examples.
-- Boost version: 1.49.0
-- Found the following Boost libraries:
-- unit_test_framework
-- Building unit test
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/build/libftdi1-1.0/build
Scanning dependencies of target docs
[ 4%] Generating doc/html/index.html
warning: ignoring unsupported tag `AUTOLINK_SUPPORT =' at line 260, file /tmp/build/libftdi1-1.0/build/Doxyfile
warning: ignoring unsupported tag `HTML_EXTRA_STYLESHEET =' at line 919, file /tmp/build/libftdi1-1.0/build/Doxyfile
[ 4%] Built target docs
Scanning dependencies of target ftdi1
[ 8%] Building C object src/CMakeFiles/ftdi1.dir/ftdi.c.o
[ 12%] Building C object src/CMakeFiles/ftdi1.dir/ftdi_stream.c.o
Linking C shared library libftdi1.so
[ 12%] Built target ftdi1
Scanning dependencies of target ftdi1-static
[ 16%] Building C object src/CMakeFiles/ftdi1-static.dir/ftdi.c.o
[ 20%] Building C object src/CMakeFiles/ftdi1-static.dir/ftdi_stream.c.o
Linking C static library libftdi1.a
[ 20%] Built target ftdi1-static
Scanning dependencies of target ftdipp1
[ 24%] Building CXX object ftdipp/CMakeFiles/ftdipp1.dir/ftdi.cpp.o
Linking CXX shared library libftdipp1.so
[ 24%] Built target ftdipp1
Scanning dependencies of target ftdipp1-static
[ 28%] Building CXX object ftdipp/CMakeFiles/ftdipp1-static.dir/ftdi.cpp.o
Linking CXX static library libftdipp1.a
[ 28%] Built target ftdipp1-static
Scanning dependencies of target doc_i
[ 32%] Generating ../doc/xml/ftdi_8c.xml
warning: ignoring unsupported tag `AUTOLINK_SUPPORT =' at line 264, file Doxyfile
warning: ignoring unsupported tag `HTML_EXTRA_STYLESHEET =' at line 923, file Doxyfile
[ 36%] Generating ftdi1_doc.i
[ 36%] Built target doc_i
[ 40%] Swig source
Scanning dependencies of target _ftdi1
[ 44%] Building C object bindings/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c.o
/tmp/build/libftdi1-1.0/build/bindings/ftdi1PYTHON_wrap.c: In function 'init_ftdi1':
/tmp/build/libftdi1-1.0/build/bindings/ftdi1PYTHON_wrap.c:11497:21: warning: variable 'md' set but not used [-Wunused-but-set-variable]
Linking C shared module _ftdi1.so
[ 44%] Built target _ftdi1
Scanning dependencies of target ftdi_eeprom
[ 48%] Building C object ftdi_eeprom/CMakeFiles/ftdi_eeprom.dir/main.c.o
Linking C executable ftdi_eeprom
[ 48%] Built target ftdi_eeprom
Scanning dependencies of target baud_test
[ 52%] Building C object examples/CMakeFiles/baud_test.dir/baud_test.c.o
Linking C executable baud_test
[ 52%] Built target baud_test
Scanning dependencies of target bitbang
[ 56%] Building C object examples/CMakeFiles/bitbang.dir/bitbang.c.o
Linking C executable bitbang
[ 56%] Built target bitbang
Scanning dependencies of target bitbang2
[ 60%] Building C object examples/CMakeFiles/bitbang2.dir/bitbang2.c.o
Linking C executable bitbang2
[ 60%] Built target bitbang2
Scanning dependencies of target bitbang_cbus
[ 64%] Building C object examples/CMakeFiles/bitbang_cbus.dir/bitbang_cbus.c.o
Linking C executable bitbang_cbus
[ 64%] Built target bitbang_cbus
Scanning dependencies of target bitbang_ft2232
[ 68%] Building C object examples/CMakeFiles/bitbang_ft2232.dir/bitbang_ft2232.c.o
Linking C executable bitbang_ft2232
[ 68%] Built target bitbang_ft2232
Scanning dependencies of target eeprom
[ 72%] Building C object examples/CMakeFiles/eeprom.dir/eeprom.c.o
Linking C executable eeprom
[ 72%] Built target eeprom
Scanning dependencies of target find_all
[ 76%] Building C object examples/CMakeFiles/find_all.dir/find_all.c.o
Linking C executable find_all
[ 76%] Built target find_all
Scanning dependencies of target find_all_pp
[ 80%] Building CXX object examples/CMakeFiles/find_all_pp.dir/find_all_pp.cpp.o
Linking CXX executable find_all_pp
[ 80%] Built target find_all_pp
Scanning dependencies of target serial_test
[ 84%] Building C object examples/CMakeFiles/serial_test.dir/serial_test.c.o
Linking C executable serial_test
[ 84%] Built target serial_test
Scanning dependencies of target simple
[ 88%] Building C object examples/CMakeFiles/simple.dir/simple.c.o
Linking C executable simple
[ 88%] Built target simple
Scanning dependencies of target stream_test
[ 92%] Building C object examples/CMakeFiles/stream_test.dir/stream_test.c.o
Linking C executable stream_test
[ 92%] Built target stream_test
Scanning dependencies of target test_libftdi1
[ 96%] Building CXX object test/CMakeFiles/test_libftdi1.dir/basic.cpp.o
[100%] Building CXX object test/CMakeFiles/test_libftdi1.dir/baudrate.cpp.o
Linking CXX executable test_libftdi1
[100%] Built target test_libftdi1
[ 4%] Built target docs
[ 12%] Built target ftdi1
[ 20%] Built target ftdi1-static
[ 24%] Built target ftdipp1
[ 28%] Built target ftdipp1-static
[ 36%] Built target doc_i
[ 44%] Built target _ftdi1
[ 48%] Built target ftdi_eeprom
[ 52%] Built target baud_test
[ 56%] Built target bitbang
[ 60%] Built target bitbang2
[ 64%] Built target bitbang_cbus
[ 68%] Built target bitbang_ft2232
[ 72%] Built target eeprom
[ 76%] Built target find_all
[ 80%] Built target find_all_pp
[ 84%] Built target serial_test
[ 88%] Built target simple
[ 92%] Built target stream_test
[100%] Built target test_libftdi1
Install the project...
-- Install configuration: "Release"
-- Installing: /tmp/build/package-libftdi/usr/lib/pkgconfig/libftdi1.pc
-- Installing: /tmp/build/package-libftdi/usr/lib/pkgconfig/libftdipp1.pc
-- Installing: /tmp/build/package-libftdi/usr/bin/libftdi1-config
-- Installing: /tmp/build/package-libftdi/usr/lib/cmake/libftdi1/LibFTDI1Config.cmake
-- Installing: /tmp/build/package-libftdi/usr/lib/cmake/libftdi1/UseLibFTDI1.cmake
-- Installing: /tmp/build/package-libftdi/usr/lib/libftdi1.so.2.0.0
-- Installing: /tmp/build/package-libftdi/usr/lib/libftdi1.so.2
-- Installing: /tmp/build/package-libftdi/usr/lib/libftdi1.so
-- Installing: /tmp/build/package-libftdi/usr/lib/libftdi1.a
-- Installing: /tmp/build/package-libftdi/usr/include/libftdi1/ftdi.h
-- Installing: /tmp/build/package-libftdi/usr/lib/libftdipp1.so.2.0.0
-- Installing: /tmp/build/package-libftdi/usr/lib/libftdipp1.so.2
-- Installing: /tmp/build/package-libftdi/usr/lib/libftdipp1.so
-- Removed runtime path from "/tmp/build/package-libftdi/usr/lib/libftdipp1.so.2.0.0"
-- Installing: /tmp/build/package-libftdi/usr/lib/libftdipp1.a
-- Installing: /tmp/build/package-libftdi/usr/include/libftdi1/ftdi.hpp
-- Installing: /tmp/build/package-libftdi/usr/lib/python2.7/site-packages/_ftdi1.so
-- Installing: /tmp/build/package-libftdi/usr/lib/python2.7/site-packages/ftdi1.py
-- Installing: /tmp/build/package-libftdi/usr/bin/ftdi_eeprom
-- Removed runtime path from "/tmp/build/package-libftdi/usr/bin/ftdi_eeprom"
cat: /home/bla bla bla/slack-desc: No such file or directory
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.