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:
# Install (optional)
install: all
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/
# Use /usr/bin for Debian packaging, /usr/local/bin for manual installs
if [ -n "$(DESTDIR)" ] && echo "$(DESTDIR)" | grep -q "debian/"; then \
install -d $(DESTDIR)/usr/bin; \
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:
# Remove from both possible locations
rm -f $(DESTDIR)/usr/local/bin/wssshc
rm -f $(DESTDIR)/usr/local/bin/wsssh
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/wsssh.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
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