-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
39 lines (33 loc) · 1.02 KB
/
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
36
37
38
39
PKG_NAME=urepo
PKG_VERSION=2.2.6
PKG_DESCRIPTION="Universal repository for Linux binary packages"
PKG_URL=https://github.com/hulu/urepo
PKG_LICENSE="MIT License"
PKG_VENDOR="Hulu"
PKG_MAINTAINER="infra-eng@hulu.com"
.PHONY: all
SHELL=/bin/bash
all: pkg
bin:
gcc -Wall -O2 -o extract-post-file extract-post-file.c
test: bin
test/run-test.sh
clean:
rm -rf extract-post-file build_${PKG_VERSION}
pkg: bin
mkdir build_${PKG_VERSION}
cp -r {var,etc} build_${PKG_VERSION}/
cp extract-post-file build_${PKG_VERSION}/var/urepo/cgi
cd build_${PKG_VERSION} && \
fpm --deb-user root --deb-group root \
-d nginx -d fcgiwrap -d createrepo \
--deb-no-default-config-files \
--description $(PKG_DESCRIPTION) \
--license $(PKG_LICENSE) \
--vendor $(PKG_VENDOR) \
--maintainer $(PKG_MAINTAINER) \
--url $(PKG_URL) \
--after-install ../after-install.sh \
--before-remove ../before-remove.sh \
-s dir -t deb -v $(PKG_VERSION) -n $(PKG_NAME) `find . -type f` && \
find . ! -name '*.deb' -delete