mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:10:13 +01:00
some housekeeping
Change-Id: I7053462f8d0c7254b468ec3be512dc014e81c01c Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
parent
ba52fa3c99
commit
6b6afc84bb
3
LICENSE
3
LICENSE
@ -1,6 +1,6 @@
|
||||
piler, an enterprise level email archiving application
|
||||
|
||||
Copyright (C) 2012-2015, Janos SUTO <sj@acts.hu>
|
||||
Copyright (C) 2012-2016, Janos SUTO <sj@acts.hu>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -13,4 +13,3 @@ GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
5
debian/changelog
vendored
5
debian/changelog
vendored
@ -1,5 +0,0 @@
|
||||
piler (0.1.25-3) 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
1
debian/compat
vendored
@ -1 +0,0 @@
|
||||
8
|
12
debian/control
vendored
12
debian/control
vendored
@ -1,12 +0,0 @@
|
||||
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
0
debian/copyright
vendored
4
debian/dirs
vendored
4
debian/dirs
vendored
@ -1,4 +0,0 @@
|
||||
/etc/init.d
|
||||
/usr/local
|
||||
/usr/local/etc
|
||||
/usr/local/libexec
|
64
debian/postinst
vendored
64
debian/postinst
vendored
@ -1,64 +0,0 @@
|
||||
#!/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
|
||||
chgrp piler /usr/local/etc/piler.key
|
||||
chmod 640 /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
|
||||
chmod 640 /usr/local/etc/piler.conf
|
||||
|
||||
chown piler:piler /var/piler/imap /var/piler/sphinx /var/piler/stat
|
||||
}
|
||||
|
||||
|
||||
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
41
debian/preinst
vendored
@ -1,41 +0,0 @@
|
||||
#!/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
14
debian/rules
vendored
@ -1,14 +0,0 @@
|
||||
#!/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:
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
open source email archiver
|
@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf master.tar.gz ~/rpmbuild; mkdir -p mkdir ~/rpmbuild/{SOURCES,BUILDROOT}
|
||||
wget https://bitbucket.org/jsuto/piler/get/master.tar.gz
|
||||
tar zxf master.tar.gz
|
||||
rm -rf piler-0.1.25
|
||||
mv jsuto-piler-* piler-0.1.25
|
||||
tar cfz ~/rpmbuild/SOURCES/master.tar.gz piler-0.1.25
|
||||
(cd piler-0.1.25 ; rpmbuild -bb piler.spec)
|
||||
|
@ -1,109 +0,0 @@
|
||||
%define name piler
|
||||
%define version 1.1.1
|
||||
%define release 1
|
||||
|
||||
Summary: an email archiving application
|
||||
Name: %{name}
|
||||
Version: %{version}
|
||||
Release: %{release}
|
||||
License: gpl
|
||||
Group: Networking/Mail
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
URL: http://www.mailpiler.org/
|
||||
Buildroot: /tmp/aa
|
||||
BuildRequires: openssl-devel, tcp_wrappers-devel, poppler-utils, libzip-devel, catdoc, mysql-devel, tnef, unrtf, tre-devel
|
||||
Requires: mysql, openssl, tcp_wrappers, libzip, poppler-utils, catdoc, tnef, unrtf, tre, httpd, php, php-mysql
|
||||
Provides: libpiler.so()(64bit)
|
||||
|
||||
%description
|
||||
piler is an email archiving application.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --prefix=/usr --libdir=/usr/lib64 --sysconfdir=/etc --localstatedir=/var --enable-starttls --enable-tcpwrappers --with-database=mysql
|
||||
make clean all
|
||||
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
|
||||
# Gotta also copy over a few other things
|
||||
mkdir -p $RPM_BUILD_ROOT/var/www
|
||||
cp -ar %{_topdir}/BUILD/%{name}-%{version}/webui $RPM_BUILD_ROOT/var/piler/www
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/share/piler
|
||||
cp -r %{_topdir}/BUILD/%{name}-%{version}/contrib $RPM_BUILD_ROOT/usr/share/piler
|
||||
|
||||
# Fix the base piler.conf file
|
||||
cp -f %{_topdir}/BUILD/%{name}-%{version}/etc/example.conf $RPM_BUILD_ROOT/etc/piler.conf.dist
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir /var/piler
|
||||
%dir /var/piler/tmp
|
||||
%dir /var/piler/sphinx
|
||||
%dir /var/piler/store
|
||||
%dir /var/piler/stat
|
||||
%dir /var/run/piler
|
||||
%attr(6555,piler,piler) /usr/bin/pileraget
|
||||
%attr(6555,piler,piler) /usr/bin/pilerexport
|
||||
%attr(6555,piler,piler) /usr/bin/pilerget
|
||||
%attr(6555,piler,piler) /usr/bin/pilerpurge
|
||||
%attr(6555,piler,piler) /usr/bin/pilerimport
|
||||
%attr(6555,piler,piler) /usr/bin/reindex
|
||||
/etc/init.d/rc.piler
|
||||
/etc/init.d/rc.pilergetd
|
||||
/etc/init.d/rc.searchd
|
||||
%attr(0640,root,piler) /etc/piler.conf
|
||||
/etc/sphinx.conf.dist
|
||||
/usr/sbin/piler
|
||||
/usr/sbin/pilergetd
|
||||
/usr/sbin/pilerconf
|
||||
/usr/lib64/libpiler.a
|
||||
/usr/lib64/libpiler.so
|
||||
/usr/lib64/libpiler.so.0
|
||||
/usr/lib64/libpiler.so.0.1.1
|
||||
/usr/libexec/piler/daily-report.php
|
||||
/usr/libexec/piler/generate_stats.php
|
||||
/usr/libexec/piler/gmail-imap-import.php
|
||||
/usr/libexec/piler/indexer.delta.sh
|
||||
/usr/libexec/piler/indexer.main.sh
|
||||
/usr/libexec/piler/import.sh
|
||||
/usr/libexec/piler/postinstall.sh
|
||||
/usr/libexec/piler/purge.sh
|
||||
/usr/share/piler/db-mysql-root.sql.in
|
||||
/usr/share/piler/db-mysql.sql
|
||||
|
||||
|
||||
%pre
|
||||
groupadd piler
|
||||
useradd -g piler -s /bin/sh -d /var/piler piler
|
||||
usermod -L piler
|
||||
if [ -d /var/piler ]; then chmod 755 /var/piler; fi
|
||||
|
||||
|
||||
%post
|
||||
chown -R piler:piler /var/run/piler /var/piler
|
||||
echo /usr/lib > /etc/ld.so.conf.d/piler.conf
|
||||
ldconfig
|
||||
echo this is the postinstall stuff...
|
||||
echo run /usr/libexec/piler/postinstall.sh manually to configure piler
|
||||
|
||||
%postun
|
||||
userdel piler
|
||||
groupdel piler
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Feb 24 2015 Janos Suto
|
||||
- 1.1.1 release of piler
|
||||
|
||||
* Fri Nov 1 2013 Janos Suto
|
||||
- Fixed a bug causing issues when reading the retention|archiving_rules tables
|
||||
|
||||
* Fri Oct 25 2013 Janos Suto
|
||||
- First release of the rpm package based on build 846
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user