Difference between revisions of "En/TDE krename"
(Page updated to new template) |
|
(No difference)
|
Latest revision as of 14:05, 21 March 2022
Welcome to Simone Giustetti's wiki pages.
Languages: English - Italiano
KRENAME
Krename is a tool handy to rename file and directory names in one single step. New names can be generated either from scratch or combining parts from the original ones. Moreover it is possible to recur to regular expressions and wildcards when renaming. Krename may prove helpful when it comes to rename hundreds of files and directories at once for example to reorder photo, book or music file collections and more. Krename was ported to KDE 4, but the release I'll introduce in the article is the Trinity Desktop Environment compatible one. Were You in need of some Krename 4 functionality, please refer to the official project home page.
Krename and Slackware
No Krename official package was ever distributed along the Slackware releases in the years. To obviate the problem the Slackbuilds.org project provides a build script to consent users in need to obtain a package from the source archive. To build the TDE 3.5.13.2 included Krename release a script was written from scratch following the project rules and conventions:
- 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.
- No specific option was issued through the configure command as no one seems needed.
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} \
--mandir=${PREFIX}/man \
--with-qt-dir=${QTDIR} \
--with-qt-includes=${PREFIX}/include \
--with-qt-libraries=${PREFIX}/lib${LIBDIRSUFFIX} \
--disable-rpath \
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.
A full script can be downloaded from the following link. The output package can be installed using command installpkg as usual in Slackware Linux.
For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net
External Links
Languages: English - Italiano