You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-07 17:42:53 +03:00
Support for lenny packages added.
Please have a look at the debian/README.Debian file for more informations. git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@671 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
16
debian/README.Debian
vendored
16
debian/README.Debian
vendored
@@ -19,6 +19,7 @@ Recommended and Suggested Packages
|
|||||||
- MySQL or PostgreSQL
|
- MySQL or PostgreSQL
|
||||||
- Courier or Dovecot
|
- Courier or Dovecot
|
||||||
|
|
||||||
|
|
||||||
Where to get help
|
Where to get help
|
||||||
=================
|
=================
|
||||||
|
|
||||||
@@ -28,3 +29,18 @@ See :
|
|||||||
- http://postfixadmin.sf.net
|
- http://postfixadmin.sf.net
|
||||||
- #postfixadmin on irc.freenode.net
|
- #postfixadmin on irc.freenode.net
|
||||||
|
|
||||||
|
|
||||||
|
How to build this package for Debian/lenny
|
||||||
|
==========================================
|
||||||
|
|
||||||
|
If you want to build this package for Debian/lenny, you have to execute
|
||||||
|
|
||||||
|
DIST="lenny" dpkg-buildpackage -rfakeroot
|
||||||
|
|
||||||
|
This will include the confd-link.sh script into the package. That script
|
||||||
|
is included in wwwconfig-common >0.2, but we have an older version in
|
||||||
|
lenny at the moment.
|
||||||
|
|
||||||
|
We (upstream and myself) want to provide also an lenny ready package,
|
||||||
|
which will be available via sf.net. Just as an easy way for interested
|
||||||
|
people which are running lenny.
|
||||||
|
86
debian/confd-link.sh
vendored
Executable file
86
debian/confd-link.sh
vendored
Executable file
@@ -0,0 +1,86 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# File: confd-link.sh
|
||||||
|
# Changes:
|
||||||
|
# 20081109 Norman Messtorff <normes@normes.org>
|
||||||
|
# Initial version.
|
||||||
|
#
|
||||||
|
# Needs: $servers - the servers to link configurations in.
|
||||||
|
# $linkname - specify the link name
|
||||||
|
# $linkdestination_apache - specify the link destination (Apache config)
|
||||||
|
# $linkdestination_lighttpd - specify the link destination (lighttpd config)
|
||||||
|
# Description: Linking configurations into Webservers conf.d
|
||||||
|
# Sets: $status = {error, nothing, linked, removed}
|
||||||
|
# $error = error message (if $status = error)
|
||||||
|
|
||||||
|
status="nothing"
|
||||||
|
error=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Checking needed settings...
|
||||||
|
#
|
||||||
|
if [ -z "$servers" ]; then
|
||||||
|
status="error"
|
||||||
|
error="No servers specified in confd-link.sh"
|
||||||
|
elif [ -z "$linkname" ]; then
|
||||||
|
status="error"
|
||||||
|
error="No linkname specified in confd-link.sh"
|
||||||
|
else
|
||||||
|
|
||||||
|
#
|
||||||
|
# The link removal part...
|
||||||
|
#
|
||||||
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||||
|
for A in $servers ; do
|
||||||
|
A=${A%,}
|
||||||
|
#
|
||||||
|
# lighttpd has no conf.d
|
||||||
|
#
|
||||||
|
if [ "$A" = "lighttpd" ]; then
|
||||||
|
linkpath="/etc/lighttpd/conf-available"
|
||||||
|
else
|
||||||
|
linkpath="/etc/$A/conf.d"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Is it existing and a symbolic link or are we going to do some unwished things?
|
||||||
|
#
|
||||||
|
if [ -L $linkpath/$linkname ]; then
|
||||||
|
if rm -f $linkpath/$linkname 2>&1 ; then
|
||||||
|
status="removed"
|
||||||
|
else
|
||||||
|
status="error"
|
||||||
|
error="ERROR! Couln't remove $linkpath/$linkname "
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
status="error"
|
||||||
|
error="ERROR! $linkpath/$linkname is no symbolic link or doesn't exists."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
for A in $servers ; do
|
||||||
|
A=${A%,}
|
||||||
|
#
|
||||||
|
# lighttpd has no conf.d
|
||||||
|
#
|
||||||
|
if [ "$A" = "lighttpd" ]; then
|
||||||
|
linkpath="/etc/lighttpd/conf-available"
|
||||||
|
linkdestination=$linkdestination_lighttpd
|
||||||
|
else
|
||||||
|
linkpath="/etc/$A/conf.d"
|
||||||
|
linkdestination=$linkdestination_apache
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $linkpath ]; then
|
||||||
|
if ln -s $linkdestination $linkpath/$linkname >/dev/null 2>&1 ; then
|
||||||
|
status="linked"
|
||||||
|
else
|
||||||
|
status="error"
|
||||||
|
error="ERROR! 'ln -s' returned an error. Could not create link in $linkpath"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
status="error"
|
||||||
|
error="ERROR! $linkpath doesn't exists. Could not create link in $linkpath"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
2
debian/control
vendored
2
debian/control
vendored
@@ -10,7 +10,7 @@ XS-Vcs-Browse: http://postfixadmin.svn.sourceforge.net/viewvc/postfixadmin/trunk
|
|||||||
|
|
||||||
Package: postfixadmin
|
Package: postfixadmin
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: debconf (>= 0.5), dbconfig-common, wwwconfig-common (>= 0.2.0), apache2 | lighttpd, libapache2-mod-php5 | php5-cgi | php5, php5-imap, php5-mysql | php5-pgsql, mysql-client | postgresql-client, ${misc:Depends}
|
Depends: debconf (>= 0.5), dbconfig-common, wwwconfig-common, apache2 | lighttpd, libapache2-mod-php5 | php5-cgi | php5, php5-imap, php5-mysql | php5-pgsql, mysql-client | postgresql-client, ${misc:Depends}
|
||||||
Recommends: postfix-mysql | postfix-pgsql, mysql-server | postgresql-server
|
Recommends: postfix-mysql | postfix-pgsql, mysql-server | postgresql-server
|
||||||
Suggests: squirrelmail-postfixadmin, dovecot-common | courier-authlib-mysql | courier-authlib-postgresql
|
Suggests: squirrelmail-postfixadmin, dovecot-common | courier-authlib-mysql | courier-authlib-postgresql
|
||||||
Description: Virtual mail hosting interface for Postfix
|
Description: Virtual mail hosting interface for Postfix
|
||||||
|
6
debian/postfixadmin.postinst
vendored
6
debian/postfixadmin.postinst
vendored
@@ -16,7 +16,11 @@ if [ "$1" = "configure" ]; then
|
|||||||
linkdestination_apache="../../postfixadmin/apache.conf"
|
linkdestination_apache="../../postfixadmin/apache.conf"
|
||||||
linkdestination_lighttpd="../../postfixadmin/lighttpd.conf"
|
linkdestination_lighttpd="../../postfixadmin/lighttpd.conf"
|
||||||
linkname="postfixadmin"
|
linkname="postfixadmin"
|
||||||
. /usr/share/wwwconfig-common/confd-link.sh
|
if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
|
||||||
|
. /usr/share/wwwconfig-common/confd-link.sh
|
||||||
|
else
|
||||||
|
. /usr/share/postfixadmin/confd-link.sh
|
||||||
|
fi
|
||||||
. /usr/share/wwwconfig-common/restart.sh
|
. /usr/share/wwwconfig-common/restart.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
6
debian/postfixadmin.prerm
vendored
6
debian/postfixadmin.prerm
vendored
@@ -14,7 +14,11 @@ if [ -f /usr/share/debconf/confmodule ]; then
|
|||||||
db_get postfixadmin/reconfigure-webserver
|
db_get postfixadmin/reconfigure-webserver
|
||||||
servers="$RET"
|
servers="$RET"
|
||||||
linkname="postfixadmin"
|
linkname="postfixadmin"
|
||||||
. /usr/share/wwwconfig-common/confd-link.sh
|
if [ -e /usr/share/wwwconfig-common/confd-link.sh ]; then
|
||||||
|
. /usr/share/wwwconfig-common/confd-link.sh
|
||||||
|
else
|
||||||
|
. /usr/share/postfixadmin/confd-link.sh
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
1
debian/rules
vendored
1
debian/rules
vendored
@@ -28,6 +28,7 @@ install: build
|
|||||||
dh_install
|
dh_install
|
||||||
mv debian/postfixadmin/usr/share/postfixadmin/config.inc.php debian/postfixadmin/etc/postfixadmin/config.inc.php
|
mv debian/postfixadmin/usr/share/postfixadmin/config.inc.php debian/postfixadmin/etc/postfixadmin/config.inc.php
|
||||||
find debian/postfixadmin -name .svn | xargs -r rm -r
|
find debian/postfixadmin -name .svn | xargs -r rm -r
|
||||||
|
if test "${DIST}" = "lenny" ; then cp debian/confd-link.sh debian/postfixadmin/usr/share/postfixadmin/; fi
|
||||||
|
|
||||||
# Build architecture-independent files here.
|
# Build architecture-independent files here.
|
||||||
binary-indep: build install
|
binary-indep: build install
|
||||||
|
Reference in New Issue
Block a user