Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deb package auto-build #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions DEBIAN/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tcpping (1.0.0) unstable; urgency=low

* Initial release

-- Jade Cheng <[email protected]>

10 changes: 10 additions & 0 deletions DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Source: tcpping
Priority: optional
Maintainer: Jade Cheng <[email protected]>
Build-Depends: libnet1, pcap
Standards-Version: 1.0.0
Version: 1.0.0
Package: tcpping
Architecture: amd64
Description: This is a unstable package for make a deb file for tcpping
Source files are from https://github.com/jwyllie83/tcpping
25 changes: 20 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
PREFIX ?=
PACKAGE=tcpping_1.0

all: tcpping manpage

uninstall: remove
Expand All @@ -8,13 +11,25 @@ tcpping: tcpping.c
manpage: tcpping.1.xml
xmltoman tcpping.1.xml | gzip > tcpping.1.gz

install:
install -m 4755 ./tcpping /usr/bin/tcpping
mkdir -p /usr/share/man/man1
install -m 644 ./tcpping.1.gz /usr/share/man/man1/tcpping.1.gz
install: all
mkdir -p $(PREFIX)/usr/bin
install -m 4755 ./tcpping $(PREFIX)/usr/bin
mkdir -p $(PREFIX)/usr/share/man/man1
install -m 644 ./tcpping.1.gz $(PREFIX)/usr/share/man/man1/tcpping.1.gz

deb: all
mkdir -p $(PACKAGE)
cp -r DEBIAN $(PACKAGE)/DEBIAN
mkdir -p $(PACKAGE)/usr/bin
install -m 4755 ./tcpping $(PACKAGE)/usr/bin
mkdir -p $(PACKAGE)/usr/share/man/man1
install -m 644 ./tcpping.1.gz $(PACKAGE)/usr/share/man/man1/tcpping.1.gz
cp LICENSE $(PACKAGE)/DEBIAN/copyright
dpkg-deb -b $(PACKAGE) $(PACKAGE).deb

remove:
rm -f /usr/bin/tcpping
rm -f $(PREFIX)/usr/bin/tcpping
rm -f $(PREFIX)/usr/share/man/man1/tcpping.1.gz

clean:
rm -f ./tcpping ./tcpping.1.gz
3 changes: 3 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Build with the following:

make

Build a debian package:
make deb

--- Setuid and tcpping ------------------------------------------------------

If you don't want to use root access to use it every time, you can setuid the
Expand Down