-
Notifications
You must be signed in to change notification settings - Fork 8
/
makefile
35 lines (29 loc) · 938 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
ifndef RPMROOT
$(error RPMROOT not defined)
endif
$(info RPMROOT=$(RPMROOT))
SOURCEDIR = $(RPMROOT)/SOURCES
BUILDDIR = $(RPMROOT)/BUILD
RPMDIR = $(RPMROOT)/RPMS
$(info SOURCEDIR=$(SOURCEDIR))
$(info BUILDDIR=$(BUILDDIR))
$(info RPMDIR=$(RPMDIR))
clean:
rm -rf $(RMPBUILD_DIR)
rm -rf dist
rpm:
# Source DIR Setup
mkdir -p $(SOURCEDIR)
mkdir -p $(SOURCEDIR)/src
mkdir -p $(SOURCEDIR)/example-conf
cp yara-logo.png $(SOURCEDIR)/yara-logo.png
cp -rp src/* $(SOURCEDIR)/src
cp -rp example-conf/yara.conf $(SOURCEDIR)/example-conf/yara.conf
cp -rp cb-yara-connector $(SOURCEDIR)/cb-yara-connector
cp cb-yara-connector.service $(SOURCEDIR)/cb-yara-connector.service
cp cb-yara-connector.spec $(SOURCEDIR)/cb-yara-connector.spec
cp -rp init-scripts/* $(SOURCEDIR)/init-scripts
# Build DIR Setup
mkdir -p $(BUILDDIR)
cp -p MANIFEST $(BUILDDIR)/MANIFEST
rpmbuild --define '_topdir $(RPMROOT)' -ba cb-yara-connector.rpm.spec