Difference between revisions of "En/TDE k3b"
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{header_en|title=Building a K3b package for TDE| keyword={{Template:keyword_en_tde}}| description=Building, installing and configuring a working K3b package for TDE and Slackware Linux | link_page=TDE_k3b}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
== K3B == | == K3B == | ||
− | [[En/trinity_desktop_environment#Applications]] | + | [[En/trinity_desktop_environment#Applications | TDE - Applications]] |
'''K3b''' is one among the '''most used Linux CD and DVD burning tools'''. The program does not write optical media per se, but it provides an easy graphical interface to widely used Unix command line tools: cdrecord, cdrdao, mkisofs recently renamed in genisofs and growisofs. Moreover K3b supports many codecs and external filters enabling the analysis of audio CD and VideoCD, the extraction and format conversion of the content. The tool can perfectly integrate with the '''Trinity Desktop Environment''' in spite of being optional and untied to the desktop environment. | '''K3b''' is one among the '''most used Linux CD and DVD burning tools'''. The program does not write optical media per se, but it provides an easy graphical interface to widely used Unix command line tools: cdrecord, cdrdao, mkisofs recently renamed in genisofs and growisofs. Moreover K3b supports many codecs and external filters enabling the analysis of audio CD and VideoCD, the extraction and format conversion of the content. The tool can perfectly integrate with the '''Trinity Desktop Environment''' in spite of being optional and untied to the desktop environment. | ||
Line 14: | Line 9: | ||
The burning program was included in Slackware many years ago. A build script exist and can be updated and integrated for TDE distributed K3b release. K3b uses '''autotools''' to build as it has not been ported to [http://www.cmake.org cmake] yet. The following rules were applied when compiling the package to ensure a clean build: | The burning program was included in Slackware many years ago. A build script exist and can be updated and integrated for TDE distributed K3b release. K3b uses '''autotools''' to build as it has not been ported to [http://www.cmake.org cmake] yet. The following rules were applied when compiling the package to ensure a clean build: | ||
− | * Directory | + | * Directory ''/opt/trinity'' was set as package root directory. |
* Some missing makefiles were created running the '''make''' command from inside the main directory of the code extracted from the source archive. | * Some missing makefiles were created running the '''make''' command from inside the main directory of the code extracted from the source archive. | ||
* The source code '''was patched''' in order to '''solve a version mismatch issue with libtool''': the source code was configured for release 2.2.6, but 2.4.2 is installed along Slackware 14.0. | * The source code '''was patched''' in order to '''solve a version mismatch issue with libtool''': the source code was configured for release 2.2.6, but 2.4.2 is installed along Slackware 14.0. | ||
Line 23: | Line 18: | ||
Some configuration scripts required by the build procedure are missing from the source tarball. We create the makefiles using the make command: | Some configuration scripts required by the build procedure are missing from the source tarball. We create the makefiles using the make command: | ||
+ | <syntaxhighlight lang="bash"> | ||
# Prepare the package for building (Create the configure script). | # Prepare the package for building (Create the configure script). | ||
echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log | echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log | ||
make -f admin/Makefile.common \ | make -f admin/Makefile.common \ | ||
2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log | 2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log | ||
+ | </syntaxhighlight> | ||
A patch is needed to solve a '''libtool''' package version mismatch conflict: | A patch is needed to solve a '''libtool''' package version mismatch conflict: | ||
+ | <syntaxhighlight lang="bash"> | ||
# Patch the admin/ltmain.sh script in order to solve a version mismatch. | # Patch the admin/ltmain.sh script in order to solve a version mismatch. | ||
patch -p0 -i ${SRCDIR}/ltmain_version_update.patch | patch -p0 -i ${SRCDIR}/ltmain_version_update.patch | ||
+ | </syntaxhighlight> | ||
'''The script specifically sets Qt libraries paths''' in order for other scripts to find them at build time: | '''The script specifically sets Qt libraries paths''' in order for other scripts to find them at build time: | ||
+ | <syntaxhighlight lang="bash"> | ||
# Add temporary paths to handle new libraries during build | # Add temporary paths to handle new libraries during build | ||
export QTDIR=/opt/trinity | export QTDIR=/opt/trinity | ||
Line 37: | Line 37: | ||
export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:/opt/trinity/lib${LIBDIRSUFFIX} | export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:/opt/trinity/lib${LIBDIRSUFFIX} | ||
export PKG_CONFIG_PATH=:/usr/lib${LIBDIRSUFFIX}/pkgconfig:/opt/trinity/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH | export PKG_CONFIG_PATH=:/usr/lib${LIBDIRSUFFIX}/pkgconfig:/opt/trinity/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH | ||
+ | </syntaxhighlight> | ||
Finally the script runs the '''./configure''' command to configure source code in accordance to the destination environment: | Finally the script runs the '''./configure''' command to configure source code in accordance to the destination environment: | ||
+ | <syntaxhighlight lang="bash"> | ||
# Configure the package | # Configure the package | ||
LDFLAGS="${SLKLDFLAGS}" \ | LDFLAGS="${SLKLDFLAGS}" \ | ||
Line 46: | Line 48: | ||
--sysconfdir="/etc/trinity" \ | --sysconfdir="/etc/trinity" \ | ||
--libdir=${LIBDIR} \ | --libdir=${LIBDIR} \ | ||
− | + | --docdir=/usr/doc \ | |
--mandir=${PREFIX}/man \ | --mandir=${PREFIX}/man \ | ||
--with-qt-dir=${QTDIR} \ | --with-qt-dir=${QTDIR} \ | ||
Line 52: | Line 54: | ||
--with-qt-libraries=${PREFIX}/lib${LIBDIRSUFFIX} \ | --with-qt-libraries=${PREFIX}/lib${LIBDIRSUFFIX} \ | ||
--disable-rpath \ | --disable-rpath \ | ||
− | + | --without-cdrecord-suid-root \ | |
− | + | --enable-ffmpeg-all-codecs \ | |
2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log | 2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log | ||
+ | </syntaxhighlight> | ||
Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software. | Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software. | ||
After build conclusion, during the binary and configuration file installation, a partial '''doinst.sh''' file containing links to libraries is copied in the directory meant for post install scripts: | After build conclusion, during the binary and configuration file installation, a partial '''doinst.sh''' file containing links to libraries is copied in the directory meant for post install scripts: | ||
+ | <syntaxhighlight lang="bash"> | ||
# Add some links needed by Quanta to find plug-ins | # Add some links needed by Quanta to find plug-ins | ||
if [ -f ${SRCDIR}/doinst.sh ]; then | if [ -f ${SRCDIR}/doinst.sh ]; then | ||
cat ${SRCDIR}/doinst.sh >> ${PKG}/install/doinst.sh | cat ${SRCDIR}/doinst.sh >> ${PKG}/install/doinst.sh | ||
fi | fi | ||
+ | </syntaxhighlight> | ||
A full script can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/35132/k3b.tar.gz link]. The output package can be installed using command '''installpkg''' as usual in Slackware Linux. | A full script can be downloaded from the following [http://www.giustetti.net/resource/slackbuild/tde/35132/k3b.tar.gz link]. The output package can be installed using command '''installpkg''' as usual in Slackware Linux. | ||
Line 77: | Line 82: | ||
External Links | External Links | ||
+ | |||
---- | ---- | ||
+ | |||
* [http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild TDE build guide] | * [http://www.trinitydesktop.org/wiki/bin/view/Developers/HowToBuild TDE build guide] | ||
* [http://www.k3b.org/ K3b home page] | * [http://www.k3b.org/ K3b home page] | ||
Line 84: | Line 91: | ||
---- | ---- | ||
− | + | {{footer_en | link_page=TDE_k3b}} |
Latest revision as of 14:05, 21 March 2022
Welcome to Simone Giustetti's wiki pages.
Languages: English - Italiano
K3B
K3b is one among the most used Linux CD and DVD burning tools. The program does not write optical media per se, but it provides an easy graphical interface to widely used Unix command line tools: cdrecord, cdrdao, mkisofs recently renamed in genisofs and growisofs. Moreover K3b supports many codecs and external filters enabling the analysis of audio CD and VideoCD, the extraction and format conversion of the content. The tool can perfectly integrate with the Trinity Desktop Environment in spite of being optional and untied to the desktop environment.
K3b and Slackware
The burning program was included in Slackware many years ago. A build script exist and can be updated and integrated for TDE distributed K3b release. K3b uses autotools to build as it has not been ported to cmake yet. The following rules were applied when compiling the package to ensure a clean build:
- Directory /opt/trinity was set as package root directory.
- Some missing makefiles were created running the make command from inside the main directory of the code extracted from the source archive.
- The source code was patched in order to solve a version mismatch issue with libtool: the source code was configured for release 2.2.6, but 2.4.2 is installed along Slackware 14.0.
- A static link was added to the doinst.sh install script. The link is needed by k3bsetup to find and enable library kcm_k3bsetup2.la. More details can be found below.
- Some specific options were used for the configure command: --docdir, --without-cdrecord-suid-root and --enable-ffmpeg-all-codecs.
Some script lines of code and related comments follow.
Some configuration scripts required by the build procedure are missing from the source tarball. We create the makefiles using the make command:
# Prepare the package for building (Create the configure script).
echo "(II) admin makefile run here" >> ${OUTPUT}/${PRGNAM}_configure.log
make -f admin/Makefile.common \
2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
A patch is needed to solve a libtool package version mismatch conflict:
# Patch the admin/ltmain.sh script in order to solve a version mismatch.
patch -p0 -i ${SRCDIR}/ltmain_version_update.patch
The script specifically sets Qt libraries paths in order for other scripts to find them at build time:
# Add temporary paths to handle new libraries during build
export QTDIR=/opt/trinity
export PATH=/opt/trinity/bin:/usr/bin:$PATH
export LIBDIR=/usr/lib${LIBDIRSUFFIX}
export LD_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX}:/opt/trinity/lib${LIBDIRSUFFIX}
export PKG_CONFIG_PATH=:/usr/lib${LIBDIRSUFFIX}/pkgconfig:/opt/trinity/lib${LIBDIRSUFFIX}/pkgconfig:$PKG_CONFIG_PATH
Finally the script runs the ./configure command to configure source code in accordance to the destination environment:
# Configure the package
LDFLAGS="${SLKLDFLAGS}" \
CFLAGS="${SLKCFLAGS}" \
CXXFLAGS="${SLKCFLAGS}" \
../${PRGNAM}-${VERSION}/configure \
--prefix=${PREFIX} \
--sysconfdir="/etc/trinity" \
--libdir=${LIBDIR} \
--docdir=/usr/doc \
--mandir=${PREFIX}/man \
--with-qt-dir=${QTDIR} \
--with-qt-includes=${PREFIX}/include \
--with-qt-libraries=${PREFIX}/lib${LIBDIRSUFFIX} \
--disable-rpath \
--without-cdrecord-suid-root \
--enable-ffmpeg-all-codecs \
2>&1 | tee -a ${OUTPUT}/${PRGNAM}_configure.log
Once the configuration successfully concludes, the script runs the make command then goes on with packaging the software.
After build conclusion, during the binary and configuration file installation, a partial doinst.sh file containing links to libraries is copied in the directory meant for post install scripts:
# Add some links needed by Quanta to find plug-ins
if [ -f ${SRCDIR}/doinst.sh ]; then
cat ${SRCDIR}/doinst.sh >> ${PKG}/install/doinst.sh
fi
A full script can be downloaded from the following link. The output package can be installed using command installpkg as usual in Slackware Linux.
K3bsetup
K3bsetup is the configuration program for K3b useful to discover hardware and to set read / write permissions for such devices in order not to use K3b through the root user. Sadly K3bsetup does not seem able to find a needed software library in spite of them being successfully compiled and installed. The issue can be solved adding some lines of code in the doinst.sh script to link the library while installing the package. K3bsetup showing an error message at start-up and complaining for a missing kcm_k3bsetup2.la library means something went wrong. The missing link can be created running the following command:
ln -s /usr/lib/trinity/kcm_k3bsetup2.la /opt/trinity/lib/trinity/kcm_k3bsetup2.la
If no /opt/trinity/lib/trinity directory is present on the system create it running command:
mkdir -p /opt/trinity/lib/trinity
For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net
External Links
Languages: English - Italiano