Hello everyone. I've been trying to fix the Linux Wacom package so that the control panel works. I figure that I need to put some code into the /usr/lib/tcl8.6/TkXInput/pkgIndex.tcl file. But first I need to check to see if it is there (on account of TkXInput having the same file).
I thought of first checking to see if the file is there and, if so, adding the proper code to it. And if not, then the code will create the file. This is as far as I got before RPM (on installing it) gave me an error about the "else" statement.
if [-e /usr/lib/tcl8.6/TkXInput/pkgIndex.tcl] then
sed '/errorhandler/ \apackage ifneeded LIBWACOMXI 1.0 [list tclPkgSetup \$dir LIBWACOMXI 1.0 {{libwacomxi.so load {wacomxi::bindevent }}}]' /usr/lib/tcl8.6/TkXInput/pkgIndex.tcl
else
# Looks like the file isn't there. Better make one.
cat > /usr/lib/tcl8.6/TkXInput/pkgIndex.tcl << EOF
#
# This file has been customized after generated by
# the "pkg_mkIndex" command.
#
package ifneeded LIBWACOMXI 1.0 [list tclPkgSetup $dir LIBWACOMXI 1.0 {{libwacomxi.so load {wacomxi::bindevent }}}]
EOF
fiI placed this code at the %post part of the rpmspec file.
I'm trying not to have any file conflicts with TkXInput, but the pkgIndex.tcl with linuxwacom-controlpanel must be in the exact spot.