forked from tomdz/storm-deb-packaging
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild_libzmq0.sh
executable file
·55 lines (53 loc) · 1.45 KB
/
build_libzmq0.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
#!/bin/bash
set -e
set -u
name=libzmq0
version=2.1.7
description="The 0MQ lightweight messaging kernel is a library which extends the
standard socket interfaces with features traditionally provided by
specialised messaging middleware products. 0MQ sockets provide an
abstraction of asynchronous message queues, multiple messaging
patterns, message filtering (subscriptions), seamless access to
multiple transport protocols and more.
.
This package contains the ZeroMQ shared library."
url="http://www.zeromq.org/"
arch="$(dpkg --print-architecture)"
section="misc"
package_version=""
src_package="zeromq-${version}.tar.gz"
download_url="http://download.zeromq.org/${src_package}"
origdir="$(pwd)"
#_ MAIN _#
rm -rf ${name}*.deb
if [[ ! -f "${src_package}" ]]; then
wget ${download_url}
fi
mkdir -p tmp && pushd tmp
rm -rf libzmq0
tar -zxf "${origdir}/${src_package}"
mv zeromq-${version} libzmq0
cd libzmq0
mkdir build
./configure
make
make install DESTDIR=`pwd`/build
#_ MAKE DEBIAN _#
cd build
fpm -t deb \
-n ${name} \
-v ${version}${package_version} \
--description "${description}" \
--url="${url}" \
-a ${arch} \
--category ${section} \
--vendor "" \
-m "${USER}@localhost" \
--prefix=/ \
-d "libc6 >= 2.7" -d "libgcc1 >= 1:4.1.1" -d "libstdc++6 >= 4.1.1" -d "libuuid1 >= 2.16" \
--after-install ${origdir}/shlib.postinst \
--after-remove ${origdir}/shlib.postuninst \
-s dir \
-- .
mv libzmq0*.deb ${origdir}
popd