-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Makefile to generate RPM and Deb packages
With fpm (https://github.com/jordansissel/fpm) it is easily possible to generate packages for various operating systems. This Makefile includes tasks to generate RPM and Debian packages: * make package_deb * make package_rpm
- Loading branch information
Showing
2 changed files
with
67 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,62 @@ | ||
SHELL := /bin/bash | ||
|
||
NAME=gosgp | ||
VERSION=0.1 | ||
|
||
# Dependencies: golang | ||
|
||
.PHONY: all clean clean_all prepare package_deb package_rpm | ||
.SILENT: desc | ||
|
||
all: desc | ||
|
||
desc: | ||
echo "usage: please use either 'make package_deb' or 'make package_rpm'" | ||
|
||
clean: | ||
rm -f $(NAME)*.deb | ||
rm -f $(NAME)*.rpm | ||
rm -rf ./build | ||
|
||
clean_all: clean | ||
rm -rf /tmp/gosgp | ||
|
||
prepare: clean | ||
mkdir -p ./build/usr/bin/ | ||
GOPATH=/tmp/gosgp go get -d | ||
GOPATH=/tmp/gosgp go build -o gosgp | ||
mv gosgp ./build/usr/bin/. | ||
|
||
package_deb: prepare | ||
fpm -s dir \ | ||
-t deb \ | ||
-n $(NAME) \ | ||
-m "Jochen Breuer <brejoc@gmail.com>" \ | ||
--url "https://github.com/brejoc/gosgp" \ | ||
--license "GPLv2" \ | ||
--description "Command line SuperGenPass password generator written in go." \ | ||
-v $(VERSION) \ | ||
--deb-user root \ | ||
--deb-group root \ | ||
-C ./build \ | ||
usr | ||
############################################################# | ||
### Don't forget to 'make clean_all' to delete GOPATH dir ### | ||
############################################################# | ||
|
||
package_rpm: prepare | ||
fpm -s dir \ | ||
-t rpm \ | ||
-n $(NAME) \ | ||
-m "Jochen Breuer <brejoc@gmail.com>" \ | ||
--url "https://github.com/brejoc/gosgp" \ | ||
--license "GPLv2" \ | ||
--description "Command line SuperGenPass password generator written in go." \ | ||
-v $(VERSION) \ | ||
--rpm-user root \ | ||
--rpm-group root \ | ||
-C ./build \ | ||
usr | ||
############################################################# | ||
### Don't forget to 'make clean_all' to delete GOPATH dir ### | ||
############################################################# |