Skip to content

Commit

Permalink
Add make target install and uninstall, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
binwiederhier committed Feb 9, 2015
1 parent 0bb27c1 commit 8d6575b
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 9 deletions.
20 changes: 18 additions & 2 deletions Makefile
@@ -1,10 +1,26 @@
all: clean deb
all:
@echo "Usage: make (clean|install|uninstall|deb)"

clean:
rm -rf build

install:
@test `id -u` = 0 || (echo "make install: Need to be root" && exit 1)
cp -a files/etc/init.d/socksproxy /etc/init.d/socksproxy
cp -a files/sbin/socksproxy /sbin/socksproxy
cp -a files/etc/socksproxy.conf /etc/socksproxy.conf
debian/postinst configure

uninstall:
@test `id -u` = 0 || (echo "make install: Need to be root" && exit 1)
debian/prerm remove
rm /etc/init.d/socksproxy 2> /dev/null || true
rm /sbin/socksproxy 2> /dev/null || true
cp -a /etc/socksproxy.conf /etc/socksproxy.conf.`date +%s` || true
debian/postrm remove

deb:
mkdir -p build/debian 2> /dev/null || true
cp -a files build/debian/files
cp -a debian build/debian/debian
cd build/debian; debuild -us -uc -i
cd build/debian; debuild -us -uc -i
14 changes: 9 additions & 5 deletions README.md
Expand Up @@ -18,17 +18,21 @@ Much like a regular HTTP(S) proxy, a SOCKS proxy can be used to redirect/tunnel
Installation
------------
Dependencies are *openssh-server* and *iptables*, so be sure to have those installed.
On Debian-based systems: Either download a `.deb`-file from the [release page](https://github.com/binwiederhier/socksproxy/releases) or compile it yourself:

**Debian-based systems:**
1. Either download a `.deb`-file from the [release page](https://github.com/binwiederhier/socksproxy/releases)
2. Or: Make the `.deb`-file yourself:
```bash
$ sudo apt-get install devscripts # for 'debuild'
$ make
$ make clean deb
$ sudo dpkg -i build/*.deb
```

Manually:
**Other Linux systems:**
Manually install it like this:
```bash
$ sudo cp files/sbin/* /sbin
$ sudo cp files/etc/* /etc
$ sudo make install
$ sudo make uninstall # To remove
```

Usage
Expand Down
8 changes: 7 additions & 1 deletion debian/changelog
@@ -1,4 +1,10 @@
socksproxy (0.1) lucid precise trusty; urgency=low
socksproxy (0.1.1) lucid precise trusty; urgency=low

* Added 'make install|uninstall' target

-- Philipp Heckel <philipp.heckel@gmail.com> Mon, 9 Feb 2015 10:12:12 +0100

socksproxy (0.1.0) lucid precise trusty; urgency=low

* First release

Expand Down
2 changes: 1 addition & 1 deletion debian/control
Expand Up @@ -6,7 +6,7 @@ Standards-Version: 3.9.5
Build-Depends: debhelper (>=7)

Package: socksproxy
Architecture: any
Architecture: all
Depends: iptables, openssh-server, openssh-client, dpkg (>= 1.15), ${misc:Depends}
Description: Simple SOCKS proxy
Creates a simple SOCKS proxy on the local machine.
Empty file modified debian/postinst 100644 → 100755
Empty file.
Empty file modified debian/postrm 100644 → 100755
Empty file.
Empty file modified debian/prerm 100644 → 100755
Empty file.
Empty file modified files/sbin/socksproxy 100644 → 100755
Empty file.

0 comments on commit 8d6575b

Please sign in to comment.