-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
45 lines (38 loc) · 1.24 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
40
41
42
43
44
45
HOME=$(shell pwd)
NAME=icecast
FORK=kh
VERSION=2.4.0
REL=22
ARCH=$(shell /opt/buildhelper/buildhelper getarch)
OS_RELEASE=$(shell /opt/buildhelper/buildhelper getosrelease)
#GITREPO=https://github.com/karlheyes/icecast-kh.git
# Shitty nameing here....
#GITREV=icecast-${VERSION}-${SUFFIX}
URL=https://github.com/karlheyes/icecast-kh/archive/${NAME}-${VERSION}-${FORK}${REL}.tar.gz
SRCFOLDER=icecast-kh-icecast-${VERSION}-${SUFFIX}
SPEC=$(shell /opt/buildhelper/buildhelper getspec ${NAME}-${FORK})
ARCHIVE=SOURCES/${NAME}-${FORK}-${VERSION}-${REL}.tar.gz
all: build
clean:
rm -rf ./rpmbuild
rm -f SOURCES/icecast-kh*
$(ARCHIVE):
WGETRC=/dev/null
wget -q -O "${ARCHIVE}" "${URL}"
build: clean $(ARCHIVE)
mkdir -p ./rpmbuild/SPECS/ ./rpmbuild/SOURCES/
cp -r ./SPECS/* ./rpmbuild/SPECS/
cp -r ./SOURCES/* ./rpmbuild/SOURCES/
rpmbuild -v -bb ${SPEC} \
--define "ver ${VERSION}" \
--define "fork ${FORK}" \
--define "rel ${REL}" \
--define "os_rel ${OS_RELEASE}" \
--define "arch ${ARCH}" \
--define "_topdir %(pwd)/rpmbuild" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
--define "debug_package %{nil}"
publish:
/opt/buildhelper/buildhelper pushrpm yum-01.stxt.media.int:8080/swisstxt-centos