summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlphaJack2021-09-11 16:24:04 +0200
committerAlphaJack2021-09-11 16:24:24 +0200
commit8f043f86d42133ddd1bb4c92ce8455ca43107ebe (patch)
tree7b2403818379f0967acfcb0751a2da0c29fddadf
parent276cf85ad9476cde59f41b8c5baf162aa2e2b68f (diff)
downloadaur-8f043f86d42133ddd1bb4c92ce8455ca43107ebe.tar.gz
Adopted package, updated it to 1.4.dev, rewritten PKGBUILD and dependency list
-rw-r--r--.SRCINFO67
-rw-r--r--PKGBUILD203
-rw-r--r--fixes-apache-path.patch18
-rw-r--r--fixes-headers.patch23
-rw-r--r--fixes-path.patch17
-rw-r--r--fixes-pear-lib.patch11
-rw-r--r--fusiondirectory.install28
-rw-r--r--fusiondirectory.php.ini22
-rw-r--r--fusiondirectory.tmpfiles4
9 files changed, 166 insertions, 227 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c073245553b8..f79c08bd9c6c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,50 +1,43 @@
-# Generated by mksrcinfo v8
-# Sun Jan 13 13:43:01 UTC 2019
pkgbase = fusiondirectory
- pkgdesc = FusionDirectory is a combination of system-administrator and end-user web interface, designed to handle LDAP based setups.
- pkgver = 1.2.3
+ pkgdesc = A combination of system administrator and end user web interface, designed to handle LDAP based setups
+ pkgver = 1.4.dev
pkgrel = 1
url = http://fusiondirectory.org/
install = fusiondirectory.install
arch = any
- license = GPL
- depends = apache
- depends = smarty3
- depends = smarty3-gettext
- depends = prototype
- depends = scriptaculous
- depends = schema2ldif
- depends = javascript-common
- depends = perl-path-class
- depends = perl-ldap
- depends = perl-mime-base64
- depends = perl-digest-sha
- depends = perl-term-readkey
- depends = perl-crypt-rijndael
+ license = GPL2
+ depends = gettext
+ depends = openldap
+ depends = perl-archive-extract
+ depends = perl-bytes-random-secure
depends = perl-crypt-cbc
+ depends = perl-digest-sha
depends = perl-file-copy-recursive
+ depends = perl-ldap
+ depends = perl-path-class
+ depends = perl-term-readkey
depends = perl-xml-twig
- depends = perl-archive-extract
- depends = perl-extutils-makemaker
+ depends = php>=7.3
+ depends = php-cas
+ depends = php-gd
depends = php-imagick
+ depends = php-imap
depends = php-ldap
depends = php-pear
- depends = php-gd
- depends = php-imap
- depends = php-apache
- depends = php-cas
- conflicts = smarty3-i18n
- backup = etc/fusiondirectory-apache.conf
- source = https://repos.fusiondirectory.org/sources/fusiondirectory/fusiondirectory-1.2.3.tar.gz
- source = fixes-path.patch
- source = fixes-apache-path.patch
- source = fixes-pear-lib.patch
- source = fixes-headers.patch
- md5sums = 36b18a7f82f6e796ce20f815b449eab4
- md5sums = 5f92d3e4378d0ea7fda7fa9c8b81d29e
- md5sums = b00b69054c4c40847aa9c575d4550244
- md5sums = 0a78917932d864cbaefa0139f90c6ab0
- md5sums = 762da632f39f44d8fe3a7fff72feec36
+ depends = schema2ldif
+ depends = smarty3
+ depends = smarty3-gettext
+ optdepends = fusiondirectory-plugins: core plugins
+ optdepends = apache: webserver
+ optdepends = nginx: webserver
+ options = !strip
+ source = https://github.com/fusiondirectory/fusiondirectory/archive/952afba6f3c0adf945937cb2fc21c40fa1d21d36.tar.gz
+ source = http://script.aculo.us/dist/scriptaculous-js-1.9.0.zip
+ source = fusiondirectory.php.ini
+ source = fusiondirectory.tmpfiles
+ sha256sums = 4f27b6e1cbb5e78aeaacddfe27ed62155d97897e615a59cd15f08c499c706c09
+ sha256sums = 1fa39bd110d3326a14f920601803813f088d08ecb2cc645aa7075884d998f6f6
+ sha256sums = a17aebba00b9380fdae13011f3ba0350ec861acaf94eedb6d68c0a04ddb0888c
+ sha256sums = 1732399f263301f212599fd862780422eca5375be1da63acd26506587a348025
pkgname = fusiondirectory
-
diff --git a/PKGBUILD b/PKGBUILD
index a60c47b9a390..ae00a7038883 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,107 +1,110 @@
-# Maintainer: K1412 <jonathan@opensides.be>
-pkgname=fusiondirectory
-pkgver=1.2.3
+# Maintainer: AlphaJack <alphajack at tuta dot io>
+# Contributor K1412 <jonathan@opensides.be>
+
+pkgname="fusiondirectory"
+pkgver=1.4.dev
pkgrel=1
-pkgdesc="FusionDirectory is a combination of system-administrator and end-user web interface, designed to handle LDAP based setups."
-arch=("any")
+_commit="952afba6f3c0adf945937cb2fc21c40fa1d21d36"
+pkgdesc="A combination of system administrator and end user web interface, designed to handle LDAP based setups"
url="http://fusiondirectory.org/"
-license=("GPL")
-depends=("apache" "smarty3" "smarty3-gettext" "prototype" "scriptaculous" "schema2ldif" "javascript-common"
-"perl-path-class" "perl-ldap" "perl-mime-base64" "perl-digest-sha" "perl-term-readkey" "perl-crypt-rijndael"
-"perl-crypt-cbc" "perl-file-copy-recursive" "perl-xml-twig" "perl-archive-extract" "perl-extutils-makemaker"
-"php-imagick" "php-ldap" "php-pear" "php-gd" "php-imap" "php-apache" "php-cas")
-install=${pkgname}.install
-conflicts=('smarty3-i18n')
-
-backup=('etc/fusiondirectory-apache.conf')
-
-source=("https://repos.fusiondirectory.org/sources/fusiondirectory/fusiondirectory-${pkgver}.tar.gz"
- "fixes-path.patch"
- "fixes-apache-path.patch"
- "fixes-pear-lib.patch"
- "fixes-headers.patch")
-
-md5sums=('36b18a7f82f6e796ce20f815b449eab4'
- "5f92d3e4378d0ea7fda7fa9c8b81d29e"
- "b00b69054c4c40847aa9c575d4550244"
- "0a78917932d864cbaefa0139f90c6ab0"
- "762da632f39f44d8fe3a7fff72feec36")
+license=("GPL2")
+arch=("any")
+depends=("gettext"
+ "openldap"
+ "perl-archive-extract"
+ "perl-bytes-random-secure"
+ "perl-crypt-cbc"
+ #"perl-crypt-rijndael"
+ "perl-digest-sha"
+ "perl-file-copy-recursive"
+ #"perl-extutils-makemaker"
+ "perl-ldap"
+ #"perl-mime-base64"
+ "perl-path-class"
+ "perl-term-readkey"
+ "perl-xml-twig"
+ "php>=7.3"
+ "php-cas"
+ #"php-filter"
+ #"php-fpdf"
+ "php-gd"
+ "php-imagick"
+ "php-imap"
+ #"php-json"
+ "php-ldap"
+ #"php-mbstring"
+ #"php-openssl"
+ "php-pear"
+ #"php-session"
+ #"php-simplexml"
+ #"php-xml"
+ "schema2ldif"
+ "smarty3"
+ "smarty3-gettext")
+optdepends=("fusiondirectory-plugins: core plugins"
+ "apache: webserver"
+ "nginx: webserver"
+ #"php-gettext: internationalized interface support"
+ #"php-mhash: ssha encryption support"
+ #"php-sha1: ssha encryption support"
+ #"php-zlib: snapshot support"
+ )
+source=(#"https://repos.fusiondirectory.org/sources/$pkgname/$pkgname-$pkgver.tar.gz"
+ "https://github.com/fusiondirectory/fusiondirectory/archive/$_commit.tar.gz"
+ "http://script.aculo.us/dist/scriptaculous-js-1.9.0.zip"
+ "$pkgname.php.ini"
+ "$pkgname.tmpfiles")
+sha256sums=('4f27b6e1cbb5e78aeaacddfe27ed62155d97897e615a59cd15f08c499c706c09'
+ '1fa39bd110d3326a14f920601803813f088d08ecb2cc645aa7075884d998f6f6'
+ 'a17aebba00b9380fdae13011f3ba0350ec861acaf94eedb6d68c0a04ddb0888c'
+ '1732399f263301f212599fd862780422eca5375be1da63acd26506587a348025')
+install="$pkgname.install"
+options=("!strip")
prepare() {
- # In srcdir
- cd "$srcdir/$pkgname-$pkgver"
-
- # Apply patchs
- patch -p1 -i ../fixes-path.patch
- patch -p1 -i ../fixes-apache-path.patch
- patch -p1 -i ../fixes-pear-lib.patch
- patch -p1 -i ../fixes-headers.patch
-
- # Right for executables
- chmod 750 ./contrib/bin/*
-
- # Create the man files
- gzip ./contrib/man/fusiondirectory.conf.5
- gzip ./contrib/man/fusiondirectory-setup.1
- gzip ./contrib/man/fusiondirectory-insert-schema.1
+ cd "$pkgname-$_commit"
+ find . -type f -exec sed -i {} \
+ -e "s|/etc/$pkgname|/etc/webapps/$pkgname|g" \
+ -e "s|/etc/ldap|/etc/openldap|g" \
+ -e "s|/var/www/$pkgname|/usr/share/webapps/$pkgname|g" \;
+ sed -i "include/variables_common.inc" -e 's|"PEAR_DIR", "/usr/share/php"|"PEAR_DIR", "/usr/share/pear"|'
}
-package() {
- # In srcdir
- cd "$srcdir/$pkgname-$pkgver"
-
- # Create multiple directories
- install -d -m 0770 $pkgdir/var/spool/$pkgname/
- install -d -m 0770 $pkgdir/var/cache/$pkgname/
- install -d -m 0770 $pkgdir/var/cache/$pkgname/tmp/
- install -d -m 0770 $pkgdir/var/cache/$pkgname/locale/
- install -d -m 0770 $pkgdir/var/cache/$pkgname/include/
- install -d -m 0770 $pkgdir/var/cache/$pkgname/template/
-
- # Copy man files
- install -d -m 0755 $pkgdir/usr/share/man/man1/
- install -d -m 0755 $pkgdir/usr/share/man/man5/
-
- cp ./contrib/man/fusiondirectory.conf.5.gz $pkgdir/usr/share/man/man5/
- cp ./contrib/man/fusiondirectory-setup.1.gz $pkgdir/usr/share/man/man1/
- cp ./contrib/man/fusiondirectory-insert-schema.1.gz $pkgdir/usr/share/man/man1/
-
- # Copy docs
- install -d -m 0770 $pkgdir/usr/share/doc/$pkgname/
- install -d -m 0770 $pkgdir/usr/share/doc/$pkgname/examples/
-
- cp ./AUTHORS.md ./Changelog ./COPYING $pkgdir/usr/share/doc/$pkgname/
- cp contrib/$pkgname.conf $pkgdir/usr/share/doc/$pkgname/
- cp -a contrib/docs/ $pkgdir/usr/share/doc/$pkgname/
- cp -a contrib/images/ $pkgdir/usr/share/doc/$pkgname/
- cp -a contrib/apache/* $pkgdir/usr/share/doc/$pkgname/examples/
- cp -a contrib/lighttpd/* $pkgdir/usr/share/doc/$pkgname/examples/
-
- # Move fusiondirectory.conf in template
- cp ./contrib/fusiondirectory.conf $pkgdir/var/cache/$pkgname/template/
-
- # Move executables
- mkdir -p $pkgdir/usr/bin/
- cp ./contrib/bin/fusiondirectory-setup $pkgdir/usr/bin/
-
- # Move smarty functions and create php lib directory if it exist
- install -d -m 0755 $pkgdir/usr/share/php/smarty3/plugins/
-
- cp ./contrib/smarty/plugins/function.msgPool.php $pkgdir/usr/share/php/smarty3/plugins/function.msgPool.php
- cp ./contrib/smarty/plugins/function.filePath.php $pkgdir/usr/share/php/smarty3/plugins/function.filePath.php
- cp ./contrib/smarty/plugins/block.render.php $pkgdir/usr/share/php/smarty3/plugins/block.render.php
-
- # Copy apache configuration
- install -d -m 0755 $pkgdir/etc/fusiondirectory/
- cp ./contrib/apache/fusiondirectory-apache.conf $pkgdir/etc/fusiondirectory/
-
- # FusionDirectory install
- install -d -m 0755 $pkgdir/usr/share/webapps/${pkgname}/
- DIRS="ihtml plugins html include locale setup"
- for i in $DIRS ; do
- cp -ua $i $pkgdir/usr/share/webapps/${pkgname}/
- done
-
- # Create symbolic link for to /usr/share/javascript
- ln -s /usr/share/javascript $pkgdir/usr/share/webapps/${pkgname}/html/javascript
+package(){
+ cd "$pkgname-$_commit"
+ # directories
+ install -d -m 755 "$pkgdir/etc/openldap/schema/$pkgname"
+ install -d -m 700 "$pkgdir/var/cache/$pkgname"
+ install -d -m 755 "$pkgdir/var/cache/$pkgname/template"
+ install -d -m 755 "$pkgdir/usr/share/doc/$pkgname/"
+ install -d -m 755 "$pkgdir/usr/share/webapps/$pkgname/"
+ install -d -m 755 "$pkgdir/usr/share/php/smarty3/plugins/"
+ install -d -m 755 "$pkgdir/var/spool/$pkgname/"
+ # webapp files and javascript libraries
+ _dirs=("html" "ihtml" "include" "locale" "plugins" "setup")
+ for _dir in "${_dirs[@]}"; do
+ cp -a "$_dir" "$pkgdir/usr/share/webapps/$pkgname/"
+ done
+ cp -a ../"scriptaculous-js-1.9.0/src/"* "$pkgdir/usr/share/webapps/$pkgname/html/include"
+ cp -a ../"scriptaculous-js-1.9.0/lib/prototype.js" "$pkgdir/usr/share/webapps/$pkgname/html/include"
+ # executables
+ find "contrib/bin/" -type f -exec chmod +x {} \;
+ mv "contrib/bin/" "$pkgdir/usr/"
+ # configuration file template
+ install -D -m 640 "contrib/$pkgname.conf" "$pkgdir/var/cache/$pkgname/template/"
+ # php extensions
+ install -D -m 644 "../$pkgname.php.ini" "$pkgdir/etc/php/conf.d/$pkgname.ini"
+ # smarty3 plugins
+ cp "contrib/smarty/plugins/"* "$pkgdir/usr/share/php/smarty3/plugins/"
+ rm -r "contrib/smarty"
+ # man pages
+ gzip -f "contrib/man/$pkgname-setup.1" "contrib/man/$pkgname-insert-schema.1" "contrib/man/$pkgname.conf.5"
+ install -D -m 644 "contrib/man/$pkgname-setup.1.gz" "$pkgdir/usr/share/man/man1/$pkgname-setup.1.gz"
+ install -D -m 644 "contrib/man/$pkgname-insert-schema.1.gz" "$pkgdir/usr/share/man/man1/$pkgname-insert-schema.1.gz"
+ install -D -m 644 "contrib/man/$pkgname.conf.5.gz" "$pkgdir/usr/share/man/man5/$pkgname.conf.5.gz"
+ rm -r "contrib/man/"
+ # example snippets
+ cp -r "contrib" "$pkgdir/usr/share/doc/$pkgname/"
+ # directories and file permission
+ install -D -m 644 "../$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}
diff --git a/fixes-apache-path.patch b/fixes-apache-path.patch
deleted file mode 100644
index 519e9ddff322..000000000000
--- a/fixes-apache-path.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/contrib/apache/fusiondirectory-apache.conf 2016-04-08 10:58:20.963919038 +0200
-+++ b/contrib/apache/fusiondirectory-apache.conf 2016-04-08 11:10:44.903889735 +0200
-@@ -1,8 +1,13 @@
- # Include FusionDirectory to your web service
--Alias /fusiondirectory /var/www/fusiondirectory/html
-+Alias /fusiondirectory /usr/share/webapps/fusiondirectory/html
-+
-+<Directory /usr/share/webapps/fusiondirectory/html>
-+ Require all granted
-+</Directory>
-
- <IfModule mod_php5.c>
- <Location /fusiondirectory>
-+ Require all granted
- php_admin_flag engine on
- php_admin_flag register_globals off
- php_admin_flag allow_call_time_pass_reference off
-
diff --git a/fixes-headers.patch b/fixes-headers.patch
deleted file mode 100644
index a04dd4aba659..000000000000
--- a/fixes-headers.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/ihtml/themes/breezy/headers.tpl 2014-09-24 18:41:56.000000000 +0200
-+++ b/ihtml/themes/breezy/headers.tpl 2014-08-25 21:40:09.109999069 +0200
-@@ -15,14 +15,14 @@
-
- <link rel="shortcut icon" href="favicon.ico"/>
-
-- <script src="include/prototype.js" type="text/javascript"></script>
-+ <script src="javascript/prototype/prototype.js" type="text/javascript"></script>
- <script src="include/fusiondirectory.js" type="text/javascript"></script>
- {if $usePrototype == 'true'}
-- <script src="include/scriptaculous.js" type="text/javascript"></script>
-- <script src="include/builder.js" type="text/javascript"></script>
-- <script src="include/effects.js" type="text/javascript"></script>
-- <script src="include/dragdrop.js" type="text/javascript"></script>
-- <script src="include/controls.js" type="text/javascript"></script>
-+ <script src="javascript/scriptaculous/scriptaculous.js" type="text/javascript"></script>
-+ <script src="javascript/scriptaculous/builder.js" type="text/javascript"></script>
-+ <script src="javascript/scriptaculous/effects.js" type="text/javascript"></script>
-+ <script src="javascript/scriptaculous/dragdrop.js" type="text/javascript"></script>
-+ <script src="javascript/scriptaculous/controls.js" type="text/javascript"></script>
- <script src="include/pulldown.js" type="text/javascript"></script>
- <script src="include/datepicker.js" type="text/javascript"></script>
- {/if}
diff --git a/fixes-path.patch b/fixes-path.patch
deleted file mode 100644
index fa47f6f44e25..000000000000
--- a/fixes-path.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/contrib/bin/fusiondirectory-setup 2015-02-25 09:18:20.000000000 +0100
-+++ b/contrib/bin/fusiondirectory-setup 2015-02-25 14:41:44.572099789 +0100
-@@ -34,12 +34,12 @@
-
- # fd's directory and class.cache file's path declaration
- my %vars = (
-- fd_home => "/var/www/fusiondirectory",
-+ fd_home => "/usr/share/webapps/fusiondirectory",
- fd_cache => "/var/cache/fusiondirectory",
- fd_config_dir => "/etc/fusiondirectory",
- fd_smarty_dir => "/usr/share/php/smarty3",
- fd_spool_dir => "/var/spool/fusiondirectory",
-- ldap_conf => "/etc/ldap/ldap.conf",
-+ ldap_conf => "/etc/openldap/ldap.conf",
- config_file => "fusiondirectory.conf",
- secrets_file => "fusiondirectory.secrets",
- locale_dir => "locale",
diff --git a/fixes-pear-lib.patch b/fixes-pear-lib.patch
deleted file mode 100644
index 1e8d88d5e9ce..000000000000
--- a/fixes-pear-lib.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/include/variables_common.inc 2014-09-24 18:41:56.000000000 +0200
-+++ b/include/variables_common.inc 2014-08-25 22:54:44.390088656 +0200
-@@ -48,7 +48,7 @@
- /*!
- * \brief php pear path
- */
--define ("PEAR_DIR", "/usr/share/php"); /*! Define PEAR directory */
-+define ("PEAR_DIR", "/usr/share/pear"); /*! Define PEAR directory */
-
- /*!
- * \brief fpdf library path
diff --git a/fusiondirectory.install b/fusiondirectory.install
index d6cf82edd86c..862dbd553ddc 100644
--- a/fusiondirectory.install
+++ b/fusiondirectory.install
@@ -1,25 +1,11 @@
-post_install() {
- # Create link for httpd-fusiondirectory.conf
- ln -s /etc/fusiondirectory/fusiondirectory-apache.conf /etc/httpd/conf/extra/httpd-fusiondirectory.conf
-
- echo '---------------------------------------------------------------------------'
- echo 'Add this line in your /etc/httpd/conf/httpd.conf'
- echo 'Include conf/extra/httpd-fusiondirectory.conf'
- echo '---------------------------------------------------------------------------'
-
- fusiondirectory-setup --update-cache --update-locales
- fusiondirectory-setup --yes --check-directories
+post_install(){
+ # commands that must be run as root on the installation device
+ fusiondirectory-setup --update-cache --update-locales
+ fusiondirectory-setup --yes --check-directories
+ chown -R http: /var/cache/fusiondirectory
}
-post_remove() {
- echo '---------------------------------------------------------------------------'
- echo 'Removing of /var/cache/fusiondirectory/'
- rm -Rf /var/cache/fusiondirectory/
- echo '---------------------------------------------------------------------------'
- echo ''
- echo '---------------------------------------------------------------------------'
- echo 'Remove this line in your /etc/httpd/conf/httpd.conf'
- echo 'Include conf/extra/httpd-fusiondirectory.conf'
- echo '---------------------------------------------------------------------------'
+post_upgrade(){
+ post_install
}
diff --git a/fusiondirectory.php.ini b/fusiondirectory.php.ini
new file mode 100644
index 000000000000..298789d36230
--- /dev/null
+++ b/fusiondirectory.php.ini
@@ -0,0 +1,22 @@
+; mandatory
+extension = cas
+extension = curl
+;extension = filter
+;extension = fpdf
+extension = gd
+extension = iconv
+extension = imagick
+extension = imap
+;extension = json
+;extension = mbstring
+extension = ldap
+;extension = openssl
+;extension = session
+;extension = simplexml
+;extension = xml
+
+; optional
+;extension = gettext
+;extension = mhash
+;extension = sha1
+;extension = zlib
diff --git a/fusiondirectory.tmpfiles b/fusiondirectory.tmpfiles
new file mode 100644
index 000000000000..1d98581279ca
--- /dev/null
+++ b/fusiondirectory.tmpfiles
@@ -0,0 +1,4 @@
+f /etc/webapps/fusiondirectory/fusiondirectory.conf 0640 root http
+d /var/cache/fusiondirectory 0700 http http
+d /var/spool/fusiondirectory 0755 http http
+Z /var/cache/fusiondirectory - http http