Update configure.sh and Makefile for proper Debian package installation

- Modified configure.sh to generate Makefile with Debian-aware installation logic
- Added conditional installation: /usr/bin for Debian packages, /usr/local/bin for manual installs
- Detects Debian builds by checking if DESTDIR contains 'debian/'
- Updated uninstall target to clean both installation locations
- Fixes dh_usrlocal error by ensuring proper file locations in Debian packages
- Maintains backward compatibility for manual installations
parent 0cc04c4f
...@@ -70,19 +70,34 @@ clean: ...@@ -70,19 +70,34 @@ clean:
# Install (optional) # Install (optional)
install: all install: all
install -d $(DESTDIR)/usr/local/bin # Use /usr/bin for Debian packaging, /usr/local/bin for manual installs
install -m 755 $(TARGETS) $(DESTDIR)/usr/local/bin/ if [ -n "$(DESTDIR)" ] && echo "$(DESTDIR)" | grep -q "debian/"; then \
install -d $(DESTDIR)/usr/local/share/man/man1 install -d $(DESTDIR)/usr/bin; \
install -m 644 $(MANPAGES) $(DESTDIR)/usr/local/share/man/man1/ install -m 755 $(TARGETS) $(DESTDIR)/usr/bin/; \
install -d $(DESTDIR)/usr/share/man/man1; \
install -m 644 $(MANPAGES) $(DESTDIR)/usr/share/man/man1/; \
else \
install -d $(DESTDIR)/usr/local/bin; \
install -m 755 $(TARGETS) $(DESTDIR)/usr/local/bin/; \
install -d $(DESTDIR)/usr/local/share/man/man1; \
install -m 644 $(MANPAGES) $(DESTDIR)/usr/local/share/man/man1/; \
fi
# Uninstall (optional) # Uninstall (optional)
uninstall: uninstall:
# Remove from both possible locations
rm -f $(DESTDIR)/usr/local/bin/wssshc rm -f $(DESTDIR)/usr/local/bin/wssshc
rm -f $(DESTDIR)/usr/local/bin/wsssh rm -f $(DESTDIR)/usr/local/bin/wsssh
rm -f $(DESTDIR)/usr/local/bin/wsscp rm -f $(DESTDIR)/usr/local/bin/wsscp
rm -f $(DESTDIR)/usr/local/share/man/man1/wssshc.1 rm -f $(DESTDIR)/usr/local/share/man/man1/wssshc.1
rm -f $(DESTDIR)/usr/local/share/man/man1/wsssh.1 rm -f $(DESTDIR)/usr/local/share/man/man1/wsssh.1
rm -f $(DESTDIR)/usr/local/share/man/man1/wsscp.1 rm -f $(DESTDIR)/usr/local/share/man/man1/wsscp.1
rm -f $(DESTDIR)/usr/bin/wssshc
rm -f $(DESTDIR)/usr/bin/wsssh
rm -f $(DESTDIR)/usr/bin/wsscp
rm -f $(DESTDIR)/usr/share/man/man1/wssshc.1
rm -f $(DESTDIR)/usr/share/man/man1/wsssh.1
rm -f $(DESTDIR)/usr/share/man/man1/wsscp.1
.PHONY: all clean install uninstall .PHONY: all clean install uninstall
EOF EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment