summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJames An2014-07-15 13:28:03 -0400
committerJames An2015-06-30 07:27:47 -0400
commit5cc3b9e228fe5019aabc7b4cdb52e9dc89412681 (patch)
tree697ed4b37ed42f0bc74099c09defeaed1078b391 /PKGBUILD
parent5fbd7595bac9ce6b64c85d40a75f421ca32c0a1b (diff)
downloadaur-5cc3b9e228fe5019aabc7b4cdb52e9dc89412681.tar.gz
Added new aegir AUR package for Aegir Systemd target.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD98
1 files changed, 20 insertions, 78 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a608766c0eb..44cad380352 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,83 +1,25 @@
# Maintainer: James An <james@jamesan.ca>
-pkgbase=aegir
-pkgname=('aegir' 'aegir-hostmaster' 'aegir-provision')
-pkgver=2.1
+
+pkgname=aegir
+pkgver=0.1
pkgrel=1
+pkgdesc="Aegir systemd target for a dedicated Aegir VPS."
arch=('any')
-url="http://aegirproject.org/"
+url='http://aegirproject.org'
license=('GPL')
-options=(!strip)
-
-#source=($pkgbase-$pkgver.tar.gz)
-sha256sums=() #autofill using updpkgsums
-
-build() {
- cd "$pkgbase-$pkgver"
-
- ./configure --prefix=/usr
- make
-}
-
-package_aegir() {
- pkgdesc="Meta-Drupal hosting system"
- install=aegir.install
- depends=('aegir-hostmaster>=2.1')
-
- cd "$pkgbase-$pkgver"
-
- make DESTDIR="$pkgdir/" install
-}
-
-package_aegir-hostmaster() {
- pkgdesc="Meta-Drupal hosting system - front end"
- install=aegir-hostmaster.install
- depends=('aegir-provision>=2.1')
-
- cd "$pkgbase-$pkgver"
-
- make DESTDIR="$pkgdir/" i
- install
-}
-
-package_aegir-provision() {
- pkgdesc="Meta-Drupal hosting system - back end"
- install=aegir-provision.install
- depends=('apache' 'drush>=5.10' 'git' 'php' 'php-gd' 'php-pear' 'mysql-clients' 'rsync' 'sudo' 'smtp-forwarder' 'unzip')
- optdepends=(
- 'apache: asdf'
- 'php-apache: '
- )
-
- # Sserver config
- # Make sure service units for httpd and mysqld are enabled.
- echo "Include /var/aegir/config/apache.conf" >> /etc/httpd/conf/httpd.conf
- sed -i 's/^open_basedir.*$/open_basedir =/' /etc/php/php.ini
- sed -i 's/^;date.timezone.*$/date.timezone = Etc\/UTC/' /etc/php/php.ini
- sed -i 's/^memory_limit = 1.*$/memory_limit = 192M/' /etc/php/php.ini
- sed -i 's/^;extension=posix.so$/;extension=posix.so/' /etc/php/php.ini
- sed -i 's/^;extension=mysqli.so$/extension=mysqli.so/' /etc/php/php.ini
- sed -i 's/^;extension=pdo_mysql.so$/extension=pdo_mysql.so/' /etc/php/php.ini
- #sed -i 's/^;$//' /etc/php/php.ini
-
- sed -i 's/^LoadModule.*mpm_event.*$/#LoadModule mpm_event_module modules\/mod_mpm_event.so/' /etc/httpd/conf/httpd.conf
- sed -i '/^LoadModule.*mpm_event.*$/a LoadModule mpm_prefork_module modules\/mod_mpm_prefork.so' /etc/httpd/conf/httpd.conf
- sed -i '/^LoadModule.*mod_dir.*$/a LoadModule php5_module modules/libphp5.so' /etc/httpd/conf/httpd.conf
- echo 'Include conf/extra/php5_module.conf' >> /etc/httpd/conf/httpd.conf
-
- # `hostname` and `uname -n` must resolve to an IP address of this server (loopback with 127.0.0.1 is sufficient).
- mysql_secure_installation
- # Install hosting-queued.service.
-
- # Aegir user creation.
-
- su -s /bin/bash - aegir
- (
- drush dl --destination=/var/aegir/.drush provision-6.x-2.0
- drush cache-clear drush
- drush hostmaster-install --web_group=http
- )
-
- cd "$pkgbase-$pkgver"
-
- make DESTDIR="$pkgdir/" install
+depends=('systemd' 'aegir-hostmaster')
+source=(
+ aegir.target
+ stop-when-unneeded.conf
+)
+md5sums=(
+ 80773e4278e09b14cc6843e346540a9d
+ 7e34786351f538d2db0bd2d3e64db43f
+)
+
+package() {
+ install -Dm755 aegir.target "${pkgdir}/usr/lib/systemd/system/aegir.target"
+ for service in aegir mysqld nginx php-fpm; do
+ install -Dm755 stop-when-unneeded.conf "${pkgdir}/usr/lib/systemd/system/${service}.service.d/stop-when-unneeded.conf"
+ done
}