summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Swaelens2018-05-31 09:50:22 +0000
committerJonathan Swaelens2018-05-31 13:05:09 +0000
commit14f905ed340892d9ee2d276e29c44ac8698bb541 (patch)
tree7b7ca8618b177902d05549160c7916b43db7053a
downloadaur-14f905ed340892d9ee2d276e29c44ac8698bb541.tar.gz
:sparkles: feat(posix): Add posix plugin
Initial commit for posix plugin Signed-off-by: Jonathan Swaelens <swaelens.jonathan@opensides.be>
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD215
-rw-r--r--fusiondirectory-plugin-posix.install8
3 files changed, 241 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a285de83170b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+# Generated by mksrcinfo v8
+# Thu May 31 13:05:01 UTC 2018
+pkgbase = fusiondirectory-plugin-posix
+ pkgdesc = Posix plugin for fusiondirectory
+ pkgver = 1.2
+ pkgrel = 0
+ url = http://fusiondirectory.org/
+ install = fusiondirectory-plugin-posix.install
+ arch = any
+ license = LGPL
+ depends = fusiondirectory>=1.0.9
+ source = http://repos.fusiondirectory.org/sources/1.0/fusiondirectory/fusiondirectory-plugins-1.2.tar.gz
+ source = http://repos.fusiondirectory.org/sources/1.0/fusiondirectory/fusiondirectory-1.2.tar.gz
+ md5sums = b5e96dc4deaed932868a809769ef8a71
+ md5sums = 5447138f0e37bebd9c2dbed41b787f27
+
+pkgname = fusiondirectory-plugin-posix
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0cadd6dfbe61
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,215 @@
+pkgname=fusiondirectory-plugin-posix
+pkgver=1.2
+pkgrel=0
+pkgdesc="Posix plugin for fusiondirectory"
+arch=("any")
+url="http://fusiondirectory.org/"
+license=("LGPL")
+depends=("fusiondirectory>=1.0.9")
+
+install=fusiondirectory-plugin-posix.install
+source=("http://repos.fusiondirectory.org/sources/1.0/fusiondirectory/fusiondirectory-plugins-${pkgver}.tar.gz"
+"http://repos.fusiondirectory.org/sources/1.0/fusiondirectory/fusiondirectory-${pkgver}.tar.gz")
+md5sums=('b5e96dc4deaed932868a809769ef8a71' '5447138f0e37bebd9c2dbed41b787f27')
+
+package() {
+cd ./fusiondirectory-plugins-${pkgver}
+# Go in plugin directory
+cd posix/
+
+
+# Plugin developers
+ if [ "posix" = "developers" ] ; then
+ mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-developers/
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/debug-help
+ cp -a ./CODING ${pkgdir}/usr/share/doc/fusiondirectory-developers/
+ cp -a ./Doxyfile ${pkgdir}/usr/share/doc/fusiondirectory-developers/
+ cp -a ./FDStandard ${pkgdir}/usr/share/doc/fusiondirectory-developers/
+ cp -a ./filter.xsd ${pkgdir}/usr/share/doc/fusiondirectory-developers/
+ cp -a ./list.xsd ${pkgdir}/usr/share/doc/fusiondirectory-developers/
+ cp -a ./simple-plugin ${pkgdir}/usr/share/doc/fusiondirectory-developers/
+ cp -a ./debug-help ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/
+ cp -a ./debug-help/html/images ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/debug-help
+
+ else
+ # Addons section
+ if [ -d ./addons ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/addons/
+
+ # Directories
+ for cur_addons in $(find ./addons -mindepth 1 -maxdepth 1 -type d) ; do
+ addons_line="$(echo ${cur_addons} | sed "s#./addons/##")"
+ cp -a ./addons/${addons_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/addons/${addons_line}
+ done
+
+ # Files
+ for cur_addons in $(find ./addons -mindepth 1 -maxdepth 1 -type f) ; do
+ addons_line="$(echo ${cur_addons} | sed "s#./addons/##")"
+ cp -a ./addons/${addons_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/addons/
+ done
+ fi
+
+
+ # Admin section
+ if [ -d ./admin ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/admin/
+
+ # Directories
+ for cur_admin in $(find ./admin -mindepth 1 -maxdepth 1 -type d) ; do
+ admin_line="$(echo ${cur_admin} | sed "s#./admin/##")"
+ cp -a ./admin/${admin_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/admin/${admin_line}
+ done
+
+ # Files
+ for cur_admin in $(find ./admin -mindepth 1 -maxdepth 1 -type f) ; do
+ admin_line="$(echo ${cur_admin} | sed "s#./admin/##")"
+ cp -a ./admin/${admin_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/admin/${admin_line}
+ done
+ fi
+
+
+ # Config section
+ if [ -d ./config ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/config/
+
+ # Directories
+ for cur_config in $(find ./config -mindepth 1 -maxdepth 1 -type d) ; do
+ config_line="$(echo ${cur_config} | sed "s#./config/##")"
+ cp -a ./config/${config_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/config/
+ done
+
+ # Files
+ for cur_config in $(find ./config -mindepth 1 -maxdepth 1 -type f) ; do
+ config_line="$(echo ${cur_config} | sed "s#./config/##")"
+ cp -a ./config/${config_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/config/
+ done
+ fi
+
+
+ # HTML section
+ if [ -d ./html ] ; then
+ if [ "posix" = "addressbook" ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+ cp -a ./html/images/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+ cp -a ./html/getvcard.php ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+
+ elif [ "posix" = "argonaut" ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+ cp -a ./html/themes/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/
+ cp -a ./html/getFAIstatus.php ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+
+ elif [ "posix" = "fusioninventory" ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+ cp -a ./html/collect.php ${pkgdir}/usr/share/webapps/fusiondirectory/html/
+ cp -a ./html/themes/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/
+ cp -a ./html/plugins/inventory.css ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+
+ elif [ "posix" = "webservice" ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/
+ cp -a ./html/jsonrpc.php ${pkgdir}/usr/share/webapps/fusiondirectory/html/
+
+ else
+ # Images directory
+ if [[ -d ./html/images ]] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+ cp -a ./html/images/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/plugins/posix/
+ fi
+
+ # Themes directory
+ if [[ -d ./html/themes ]] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/html/
+ cp -a ./html/themes/ ${pkgdir}/usr/share/webapps/fusiondirectory/html/
+ fi
+ fi
+ fi
+
+
+ # Include section
+ if [ -d ./include ] ; then
+ # Directories
+ for cur_include in $(find ./include -mindepth 1 -maxdepth 1 -type d) ; do
+ include_line="$(echo ${cur_include} | sed "s#./include/##")"
+ cp -a ./include/${include_line} ${pkgdir}/usr/share/webapps/fusiondirectory/include/
+ done
+
+ # Files
+ for cur_include in $(find ./include -mindepth 1 -maxdepth 1 -type f) ; do
+ include_line="$(echo ${cur_include} | sed "s#./include/##")"
+ cp -a ./include/${include_line} ${pkgdir}/usr/share/webapps/fusiondirectory/include/
+ done
+ fi
+
+
+ # Locale section
+ if [ -d ./locale ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/locale/plugins/addressbook/locale/
+
+ # Directories
+ for cur_locale in $(find ./locale -mindepth 1 -maxdepth 1 -type d) ; do
+ locale_line="$(echo ${cur_locale} | sed "s#./locale/##")"
+ cp -a ./locale/${locale_line} ${pkgdir}/usr/share/webapps/fusiondirectory/locale/plugins/addressbook/locale/
+ done
+
+ # Files
+ for cur_locale in $(find ./locale -mindepth 1 -maxdepth 1 -type f) ; do
+ locale_line="$(echo ${cur_locale} | sed "s#./locale/##")"
+ cp -a ./locale/${locale_line} ${pkgdir}/usr/share/webapps/fusiondirectory/locale/plugins/addressbook/locale/
+ done
+ fi
+
+
+ # Personal section
+ if [ -d ./personal ] ; then
+ mkdir -p ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/personal/
+
+ # Directories
+ for cur_personal in $(find ./personal -mindepth 1 -maxdepth 1 -type d) ; do
+ personal_line="$(echo ${cur_personal} | sed "s#./personal/##")"
+ cp -a ./personal/${personal_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/personal/
+ done
+
+ # Files
+ for cur_personal in $(find ./personal -mindepth 1 -maxdepth 1 -type f) ; do
+ personal_line="$(echo ${cur_personal} | sed "s#./personal/##")"
+ cp -a ./personal/${personal_line} ${pkgdir}/usr/share/webapps/fusiondirectory/plugins/personal/
+ done
+ fi
+
+ # Contrib section for samba and supann
+ if [ "posix" = "samba" ] ; then
+ mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-samba/
+ cp -a ./contrib/fix_munged ${pkgdir}/usr/share/doc/fusiondirectory-plugin-samba/
+
+ elif [ "posix" = "supann" ] ; then
+ mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-supann/examples/
+ cp -a ./contrib/supann/* ${pkgdir}/usr/share/doc/fusiondirectory-plugin-supann/examples/
+ fi
+
+ # SQL section
+ if [ -d ./contrib/sql ] ; then
+ mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix-schema/
+ cp ../../fusiondirectory-${pkgver}/{AUTHORS,Changelog,COPYING} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix-schema/
+
+ # Directories
+ for cur_sql in $(find ./contrib/sql -mindepth 1 -maxdepth 1 -type d) ; do
+ sql_line="$(echo ${cur_sql} | sed "s#./contrib/sql/##")"
+ cp -a ./contrib/sql/${sql_line} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix-schema/
+ done
+
+ # Files
+ for cur_sql in $(find ./contrib/sql -mindepth 1 -maxdepth 1 -type f ! -name "example.ldif" ) ; do
+ sql_line="$(echo ${cur_sql} | sed "s#./contrib/sql/##")"
+ cp -a ./contrib/sql/${sql_line} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix-schema/
+ done
+ fi
+ fi
+
+
+ # Docs
+ mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix/
+ cp ../../fusiondirectory-${pkgver}/{AUTHORS,Changelog,COPYING} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-posix/
+
+}
+
diff --git a/fusiondirectory-plugin-posix.install b/fusiondirectory-plugin-posix.install
new file mode 100644
index 000000000000..925d068fcdc0
--- /dev/null
+++ b/fusiondirectory-plugin-posix.install
@@ -0,0 +1,8 @@
+post_install() {
+ fusiondirectory-setup --update-cache --update-locales
+}
+
+post_remove() {
+ fusiondirectory-setup --update-cache --update-locales
+}
+