martin-ueding/thinkpad-scripts

thinkpad-* issue

atenrok opened this issue · 6 comments

I have compiled the scripts from thinkpad-scripts_4.0.8.tar.gz package. All the .desktop files are trying to launch nonexisting thinkpad- binaries, while the actual script files are named think-*.

I have looked into the setup.py and I did not see anything of think-*. How did you compile the scripts?

Martin,
sorry I should have been clearer on my case. I did:

$ tar xvzf thinkpad-scripts_4.0.8.tar.gz
$ cd thinkpad-scripts-4.0.8/
$ make
$ sudo make install

but now that you've mentioned, I looked carefully at the output of make install

install -d "/lib/udev/rules.d/"
install -m 644 81-thinkpad-dock.rules -t "/lib/udev/rules.d/"
install -d "/lib/udev/hwdb.d/"
install -m 644 90-X2x0T-keyboard.hwdb -t "/lib/udev/hwdb.d/"
install -d "/etc/acpi/events/"
install -m 644 thinkpad-mutemic-acpi-hook -t "/etc/acpi/events/"
install -m 644 thinkpad-rotate-acpi-hook-1 -t "/etc/acpi/events/"
install -m 644 thinkpad-rotate-acpi-hook-2 -t "/etc/acpi/events/"
cd desktop && make install
make[1]: Entering directory /home/username/_devel/gadget-thinkpad_x230t/thinkpad-scripts-4.0.8/desktop' install -d "/usr/share/applications/" for desktopfile in thinkpad-dock-off.desktop thinkpad-touch.desktop thinkpad-dock-on.desktop thinkpad-rotate-flip.desktop thinkpad-rotate-left.desktop thinkpad-touchpad.desktop thinkpad-rotate.desktop; do \ install -m 644 "$desktopfile" -t "/usr/share/applications/"; \ done make[1]: Leaving directory/home/username/_devel/gadget-thinkpad_x230t/thinkpad-scripts-4.0.8/desktop'
cd doc && make install
make[1]: Entering directory /home/username/_devel/gadget-thinkpad_x230t/thinkpad-scripts-4.0.8/doc' if ls _build/man/*.1.gz &> /dev/null; then \ install -d "/usr/share/man/man1/"; \ install -m 644 _build/man/*.1.gz -t "/usr/share/man/man1/"; \ fi make[1]: Leaving directory/home/username/_devel/gadget-thinkpad_x230t/thinkpad-scripts-4.0.8/doc'

and I dont see anything being installed to /usr/bin at all. So that means that all these files

ls -1 /usr/bin/think-*
/usr/bin/think-dock
/usr/bin/think-dock-hook
/usr/bin/think-rotate
/usr/bin/think-touchpad

are actually left there from previous installation of this script (version 2.1). And I don't have any thinkpad-* files in my /usr/bin

$ ls /usr/bin/thinkpad-*
ls: cannot access /usr/bin/thinkpad-*: No such file or directory

What am I doing wrong?

The installation is a little more involved, I fear. I would strongly prefer something that works right out of the box with a make install. Different distributions have different settings for their Python modules so I have excluded that from the makefile. Debian has special options for the setup.py that are chosen automatically.

I have hoped that the README with its link to the documentation with its link to the getting started guide would be easy enough to find. Since you should not have to dig for this, I included warning in the makefile now. When you install this with make install it will point you to the right spot in the documentation where I wrote that you can either use make full-install or do the steps needed for your platform.

I hope this helps.

sorry, my bad. You got it all right Martin. Actually I did find the "getting started guide" and I thought I followed it, while in fact I have indeed missed the "./setup.py" step, typically I never had to do anything else after "make install" before. Now everything works fine.

The only suggestion I have, if you could add an "uninstall" rule to the makefile. It is just that I wanted to cleanup the files from the previous version of the script, and now have to do that manually.

The uninstall rule would have to be added to the previous versions in retrospect, which makes it way harder. On Debian systems, I always use a package for that so that I can remove them easliy.

What distribution do you use?

Fedora, and nobody made an rpm yet.