Skip to content

Commit d763331

Browse files
author
Brane F. Gračnar
committed
Added Debian/Ubuntu package creation scripts.
You can create debian package using the following command: dpkg-buildpackage -rfakeroot -b
1 parent 9661a6d commit d763331

File tree

8 files changed

+196
-0
lines changed

8 files changed

+196
-0
lines changed

debian/changelog

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
stud (0.3~0.20111212) unstable; urgency=low
2+
3+
* Initial release.
4+
5+
-- Charlie Root <[email protected]> Mon, 12 Dec 2011 13:24:18 +0100
6+

debian/compat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

debian/control

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Source: stud
2+
Section: universe/net
3+
Priority: optional
4+
Maintainer: Charlie Root <[email protected]>
5+
Build-Depends: debhelper (>= 7.0.50~)
6+
Standards-Version: 3.9.2
7+
Homepage: https://github.com/bumptech/stud
8+
9+
Package: stud
10+
Section: universe/net
11+
Priority: optional
12+
Architecture: any
13+
Depends: libc6 (>= 2.4), libev4 (>= 1:4.04), libssl0.9.8 (>= 0.9.8k-1) | libssl1.0.0 (>= 1.0.0e-1)
14+
# Depends: ${shlibs:Depends}, ${misc:Depends}
15+
Description: The Scalable TLS Unwrapping Daemon
16+
stud is a network proxy that terminates TLS/SSL connections and forwards
17+
the unencrypted traffic to some backend. It's designed to handle 10s of
18+
thousands of connections efficiently on multicore machines.
19+
.
20+
It follows a process-per-core model; a parent process spawns N children who
21+
each accept() on a common socket to distribute connected clients among them.
22+
Within each child, asynchronous socket I/O is conducted across the local
23+
connections using libev and OpenSSL's nonblocking API. By default, stud
24+
has an overhead of ~200KB per connection--it preallocates some buffer space
25+
for data in flight between frontend and backend.
26+

debian/copyright

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright 2011 Bump Technologies, Inc. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification, are
4+
permitted provided that the following conditions are met:
5+
6+
1. Redistributions of source code must retain the above copyright notice, this list of
7+
conditions and the following disclaimer.
8+
9+
2. Redistributions in binary form must reproduce the above copyright notice, this list
10+
of conditions and the following disclaimer in the documentation and/or other materials
11+
provided with the distribution.
12+
13+
THIS SOFTWARE IS PROVIDED BY BUMP TECHNOLOGIES, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED
14+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
15+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BUMP TECHNOLOGIES, INC. OR
16+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
17+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
20+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
21+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22+
23+
The views and conclusions contained in the software and documentation are those of the
24+
authors and should not be interpreted as representing official policies, either expressed
25+
or implied, of Bump Technologies, Inc.

debian/postinst

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/sh
2+
3+
case $1 in
4+
# Configure this package. If the package must prompt the user for
5+
# information, do it here.
6+
configure)
7+
mkdir -p /var/run/stud
8+
;;
9+
10+
# Back out of an attempt to upgrade this package FROM THIS VERSION
11+
# to version $2. Undo the effects of "prerm upgrade $2".
12+
abort-upgrade)
13+
;;
14+
15+
# Back out of an attempt to remove this package, which was due to
16+
# a conflict with package $3 (version $4). Undo the effects of
17+
# "prerm remove in-favour $3 $4".
18+
abort-remove)
19+
;;
20+
21+
# Back out of an attempt to deconfigure this package, which was
22+
# due to package $6 (version $7) which we depend on being removed
23+
# to make way for package $3 (version $4). Undo the effects of
24+
# "prerm deconfigure in-favour $3 $4 removing $6 $7".
25+
abort-deconfigure)
26+
;;
27+
28+
*)
29+
echo "$0: didn't understand being called with \`$1'" 1>&2
30+
exit 1;
31+
;;
32+
33+
esac
34+
35+
if service stud status >/dev/null 2>&1; then
36+
echo
37+
echo " !!!! WARNING !!!!"
38+
echo
39+
echo "stud is running, you should restart it."
40+
echo
41+
fi
42+
43+
# EOF

debian/postrm

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
case "$1" in
4+
remove|purge|abort-install|abort-upgrade)
5+
# This package is being removed, but its configuration has not yet
6+
# been purged.
7+
8+
# stud shouldn't start at system startup
9+
# update-rc.d -f stud remove
10+
11+
# remove rundir
12+
rm -rf /var/run/stud >/dev/null 2>&1
13+
14+
# remove config dir
15+
rm -rf /etc/stud >/dev/null 2>&1
16+
17+
;;
18+
19+
disappear)
20+
;;
21+
22+
upgrade)
23+
;;
24+
25+
failed-upgrade)
26+
;;
27+
28+
*) echo "$0: didn't understand being called with \`$1'" 1>&2
29+
exit 1;;
30+
esac
31+
32+
exit 0
33+
34+
# EOF

debian/prerm

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
3+
case "$1" in
4+
remove|purge|abort-install|abort-upgrade)
5+
# This package is being removed, but its configuration has not yet
6+
# been purged.
7+
8+
# shutdown service
9+
service stud stop
10+
11+
;;
12+
13+
disappear)
14+
;;
15+
16+
upgrade)
17+
;;
18+
19+
failed-upgrade)
20+
;;
21+
22+
*) echo "$0: didn't understand being called with \`$1'" 1>&2
23+
exit 1;;
24+
esac
25+
26+
exit 0
27+
28+
# EOF

debian/rules

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/make -f
2+
3+
# Uncomment this to turn on verbose mode.
4+
#export DH_VERBOSE=1
5+
6+
override_dh_auto_clean:
7+
rm -rf ebtree
8+
make clean
9+
10+
override_dh_auto_configure:
11+
if [ ! -f ebtree-6.0.6.tar.gz ]; then wget http://1wt.eu/tools/ebtree/ebtree-6.0.6.tar.gz; fi
12+
if [ ! -d ebtree ]; then tar zxpf ebtree-6.0.6.tar.gz; mv ebtree-6.0.6 ebtree; fi
13+
14+
override_dh_auto_build:
15+
make USE_SHARED_CACHE=1 PREFIX=/usr
16+
17+
override_dh_auto_install:
18+
dh_testdir
19+
dh_testroot
20+
dh_prep
21+
dh_installdirs
22+
make install DESTDIR=$(CURDIR)/debian/stud PREFIX=/usr
23+
24+
# create stud instance configuration directory
25+
mkdir -p $(CURDIR)/debian/stud/etc/stud
26+
chown -R root:root $(CURDIR)/debian/stud/etc/stud
27+
chmod 700 $(CURDIR)/debian/stud/etc/stud
28+
echo "Run /etc/init.d/stud --sample-config > /etc/stud/something.conf for default instance configuration" >> "$(CURDIR)/debian/stud/etc/stud/README.TXT"
29+
30+
%:
31+
dh $@
32+
33+
# EOF

0 commit comments

Comments
 (0)