-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95de70d
commit e04fdf6
Showing
7 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.vagrant | ||
ceres/ | ||
ceres*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
BASE_NAME=nmap-analyze | ||
BIN_NAME=nmap-analyze | ||
|
||
all: | ||
@echo 'Example: SRC_DIR=../../ BIN_DIR=../../target/release/ ARCH=amd64 VERSION=0.1.0-alpha-3 TAG=$VERSION DIST=trusty make package' | ||
|
||
package: $(BASE_NAME)-$(VERSION)-$(DIST)-$(ARCH).deb | ||
|
||
$(BASE_NAME)-$(VERSION)-$(DIST)-$(ARCH).deb: $(BASE_NAME)/DEBIAN/control $(BASE_NAME)/DEBIAN/conffiles $(BASE_NAME)/DEBIAN/postinst $(BASE_NAME)/DEBIAN/prerm $(BASE_NAME)/usr/bin/$(BIN_NAME) | ||
dpkg-deb -b $(BASE_NAME) $@ | ||
dpkg-deb -I $@ | ||
|
||
clean: | ||
-rm -fR $(BASE_NAME) | ||
-rm $(BASE_NAME)-$(VERSION)-$(DIST)-$(ARCH).deb | ||
|
||
$(BASE_NAME)/DEBIAN/control: templates/DEBIAN/control $(BASE_NAME)/usr/bin/$(BIN_NAME) $(BASE_NAME)/DEBIAN | ||
SIZE=`du -s $(BASE_NAME)/usr/bin/$(BIN_NAME) | awk '{ print $$1}'`; SANE_VERSION=`echo $$VERSION | sed 's/^[a-z]*//'`; sed "s/@@PACKAGE_NAME@@/$(BASE_NAME)/; s/@@VERSION@@/$${SANE_VERSION}/; s/@@ARCH@@/$(ARCH)/; s/@@SIZE@@/$${SIZE}/" $< > $@ | ||
|
||
$(BASE_NAME)/usr/bin/$(BIN_NAME): $(BIN_DIR)/$(BIN_NAME) $(BASE_NAME)/usr/bin | ||
cp $< $@ | ||
|
||
$(BASE_NAME)/DEBIAN/postinst: templates/DEBIAN/postinst | ||
cp $< $@ | ||
chmod 755 $@ | ||
|
||
$(BASE_NAME)/DEBIAN/prerm: templates/DEBIAN/prerm | ||
cp $< $@ | ||
chmod 755 $@ | ||
|
||
$(BASE_NAME)/DEBIAN/conffiles: templates/DEBIAN/conffiles | ||
cp $< $@ | ||
|
||
$(BASE_NAME)/usr/bin: | ||
mkdir -p $@ | ||
|
||
$(BASE_NAME)/usr/share/man/man1: | ||
mkdir -p $@ | ||
|
||
$(BASE_NAME)/usr/share/man/man5: | ||
mkdir -p $@ | ||
|
||
$(BASE_NAME)/DEBIAN: | ||
mkdir -p $@ | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: @@PACKAGE_NAME@@ | ||
Version: @@VERSION@@ | ||
Section: admin | ||
Priority: optional | ||
Architecture: @@ARCH@@ | ||
Installed-Size: @@SIZE@@ | ||
Maintainer: [email protected] | ||
Description: Analyzes nmap xml output and compares results with expected specification | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
chown root:root /usr/bin/nmap-analyze | ||
chmod 755 /usr/bin/nmap-analyze | ||
|
||
mandb | ||
|
Empty file.