Skip to content

Instantly share code, notes, and snippets.

@dcode
Last active October 27, 2015 18:29
Show Gist options
  • Save dcode/0ce68f3c3f9801753eea to your computer and use it in GitHub Desktop.
Save dcode/0ce68f3c3f9801753eea to your computer and use it in GitHub Desktop.
Makefile for building RPMs
#!/usr/bin/make -f
### CONFIGURATION BEGINS ###
PACKAGE:=bro-plugin-foo
MAINTAINER:=<derek@criticalstack.com>
VENDOR:=Critical Stack, Inc.
WEBSITE:=http://www.criticalstack.com
DESCRIPTION:=Build scripts for Critical Stack sensor configurations.
VERSION:=0.2.0
RELEASE:=1
ARCH:=all
PKG_ROOT:=buildroot
INSTALLDIR:=/opt/bro/lib/bro/plugins/
### CONFIGURATION ENDS ###
rpm:
fpm -t rpm -s dir -C "${PKG_ROOT}" \
--iteration "${RELEASE}" \
--license BSD \
--maintainer "${MAINTAINER}" \
--description "${DESCRIPTION}" \
--vendor "${VENDOR}" \
--url "${WEBSITE}" \
--prefix "${INSTALLDIR}" \
--exclude ".git" \
--rpm-os "linux" \
-n "${PACKAGE}" \
-v "${VERSION}" \
-a "${ARCH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment