Thanks! And here is a Makefile
edmundhighcock opened this issue · comments
Thanks for investigating this, it's been driving me crazy! I have installed it on openSuse Tumbleweed, and so far it is running without seeing the same issue. I made a Makefile which does this whole installation and allows uninstall: here it is in case it is useful (and feel free to include it in the repo).
At the moment you use the makefile by putting in a clean folder and running make all
, and it then clones the repo and builds & installs it. If you place it in the top level of the repo itself, you would need to set CODE_FOLDER=
and CD_CODE_FOLDER=
(i.e. empty).
# Licence: MIT
# Author: edmundhighcock@users.sourceforge.net
# These variables tested on openSUSE Tumbleweed
LIBRARY=/opt/logmein-hamachi/bin/hamachid-patcher.so
BIN=/opt/logmein-hamachi/bin/hamachid
LOGMEIN_BIN=$(BIN).org
CODE_FOLDER=hamachi-fix/
CD_CODE_FOLDER=cd $(CODE_FOLDER) &&
.PHONY: all new_binary uninstall clean
all: new_binary
hamachi-fix:
git clone git@github.com:ejtagle/hamachi-fix-ubuntu20.04-or-newer.git $@
$(CODE_FOLDER)hamachid-patcher.so: hamachi-fix
$(CD_CODE_FOLDER)gcc -fPIC -O2 -Wall -o hamachid-patcher.so -shared hamachid-patcher.c
$(CODE_FOLDER)hamachid: $(CODE_FOLDER)hamachid-patcher.so
$(CD_CODE_FOLDER)gcc -fPIC -O2 -Wall -o hamachid hamachid.c
$(LIBRARY): $(CODE_FOLDER)hamachid-patcher.so
sudo cp $^ $@
$(LOGMEIN_BIN):
sudo mv $(BIN) $@
new_binary: $(CODE_FOLDER)hamachid $(LOGMEIN_BIN) $(LIBRARY)
sudo cp $(CODE_FOLDER)hamachid $(BIN)
uninstall:
sudo mv $(LOGMEIN_BIN) $(BIN)
sudo rm $(LIBRARY)
clean:
rm $(CODE_FOLDER)hamachid
rm $(CODE_FOLDER)hamachid-patcher.so