mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:37:02 +02:00
added metainfo to create deb package of piler
This commit is contained in:
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
piler (0.1.25-2) UNRELEASED; urgency=low
|
||||
|
||||
* Improved deb package of piler build 845.
|
||||
|
||||
-- sj <sj@acts.hu> Wed, 11 Oct 2013 20:56:24 +0200
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
||||
8
|
12
debian/control
vendored
Normal file
12
debian/control
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
Source: piler
|
||||
Maintainer: Janos SUTO <sj@acts.hu>
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Standards-Version: 0.1.25
|
||||
Build-Depends: debhelper (>= 8), unrtf, catdoc, tnef, poppler-utils, libwrap0, libtre5, libzip2
|
||||
|
||||
Package: piler
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: email archiving
|
||||
piler open source email archiver
|
0
debian/copyright
vendored
Normal file
0
debian/copyright
vendored
Normal file
4
debian/dirs
vendored
Normal file
4
debian/dirs
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/etc/init.d
|
||||
/usr/local
|
||||
/usr/local/etc
|
||||
/usr/local/libexec
|
60
debian/postinst
vendored
Normal file
60
debian/postinst
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
generate_pem_file() {
|
||||
|
||||
if [ ! -f /usr/local/etc/piler.pem ]; then
|
||||
echo "generating pem file . . ."
|
||||
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout /usr/local/etc/piler.pem -out 1.cert
|
||||
cat 1.cert >> /usr/local/etc/piler.pem
|
||||
chmod 600 /usr/local/etc/piler.pem
|
||||
rm 1.cert
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
generate_key_file() {
|
||||
|
||||
if [ ! -f /usr/local/etc/piler.key ]; then
|
||||
echo "generating key file . . ."
|
||||
dd if=/dev/urandom bs=56 count=1 of=/usr/local/etc/piler.key
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
fix_permissions() {
|
||||
chown piler:piler /usr/local/bin/pilerexport /usr/local/bin/pilerpurge /usr/local/bin/pilerimport /usr/local/bin/pilerget /usr/local/bin/pileraget /usr/local/bin/reindex
|
||||
chmod +s /usr/local/bin/pilerexport /usr/local/bin/pilerpurge /usr/local/bin/pilerimport /usr/local/bin/pilerget /usr/local/bin/pileraget /usr/local/bin/reindex
|
||||
chgrp piler /usr/local/etc/piler.conf /usr/local/etc/piler.key
|
||||
chmod 640 /usr/local/etc/piler.conf /usr/local/etc/piler.key
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
chown piler:piler /var/run/piler /var/piler/store /var/piler/tmp
|
||||
|
||||
generate_pem_file
|
||||
generate_key_file
|
||||
fix_permissions
|
||||
|
||||
ldconfig
|
||||
|
||||
;;
|
||||
|
||||
upgrade|abort-upgrade)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
41
debian/preinst
vendored
Normal file
41
debian/preinst
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
create_piler_user() {
|
||||
id piler &>/dev/null
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
groupadd piler
|
||||
useradd -g piler -s /bin/sh -d /var/piler piler
|
||||
usermod -L piler
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
save_current_config() {
|
||||
BAKFILE=/usr/local/etc/piler.conf.`date +%s`
|
||||
cp /usr/local/etc/piler.conf $BAKFILE
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
install)
|
||||
create_piler_user
|
||||
;;
|
||||
|
||||
upgrade|abort-upgrade)
|
||||
save_current_config
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
||||
|
14
debian/rules
vendored
Executable file
14
debian/rules
vendored
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- --build=x86_64-linux-gnu --prefix=/usr/local --sysconfdir=/usr/local/etc --libexecdir=/usr/local/libexec --localstatedir=/var --infodir=/usr/local/share/info --with-database=mysql --enable-starttls --enable-tcpwrappers
|
||||
|
||||
override_dh_auto_install:
|
||||
$(MAKE) DESTDIR=$$(pwd)/debian/piler prefix=/usr/local install
|
||||
|
||||
override_dh_usrlocal:
|
||||
|
||||
|
Reference in New Issue
Block a user