forked from phobos182/storm-deb-packaging
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild_storm.sh
executable file
·60 lines (56 loc) · 1.76 KB
/
build_storm.sh
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
set -e
set -u
name=storm
version=0.8.1
description="Storm is a distributed realtime computation system. Similar to how Hadoop provides a set of general primitives
for doing batch processing, Storm provides a set of general primitives for doing realtime computation. Storm is simple, can
be used with any programming language, is used by many companies, and is a lot of fun to use!"
url="http://storm-project.net"
arch="all"
section="misc"
package_version=""
src_package="storm-${version}.zip"
download_url="https://github.com/downloads/nathanmarz/storm/${src_package}"
origdir="$(pwd)"
storm_root_dir=/usr/lib/storm
#_ MAIN _#
rm -rf ${name}*.deb
if [[ ! -f "${src_package}" ]]; then
wget ${download_url}
fi
mkdir -p tmp && pushd tmp
rm -rf storm
mkdir -p storm
cd storm
mkdir -p build${storm_root_dir}
mkdir -p build/etc/default
mkdir -p build/etc/storm
mkdir -p build/etc/init
mkdir -p build/var/log/storm
unzip ${origdir}/storm-${version}.zip
rm -rf storm-${version}/logs
rm -rf storm-${version}/log4j
rm -rf storm-${version}/conf
cp -R storm-${version}/* build${storm_root_dir}
cd build
cp ${origdir}/storm ${origdir}/storm-nimbus ${origdir}/storm-supervisor ${origdir}/storm-ui ${origdir}/storm-drpc etc/default
cp ${origdir}/storm.yaml etc/storm
cp ${origdir}/storm.log.properties etc/storm
cp ${origdir}/storm-nimbus.conf ${origdir}/storm-supervisor.conf ${origdir}/storm-ui.conf ${origdir}/storm-drpc.conf etc/init
#_ MAKE DEBIAN _#
fpm -t deb \
-n ${name} \
-v ${version}${package_version} \
--description "${description}" \
--url="{$url}" \
-a ${arch} \
--category ${section} \
--vendor "" \
-m "${USER}@localhost" \
--prefix=/ \
-d "libzmq0 = 2.1.7" -d "jzmq >= 2.1.0" -d "unzip" \
-s dir \
-- .
mv storm*.deb ${origdir}
popd