summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7e3e35a0c0043af3349332214ea6f7e841897183 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pkgname=fusiondirectory-plugin-opsi-schema
pkgver=1.2.3
pkgver=1.2.3
pkgrel=1
pkgdesc="LDAP schema for FusionDirectory opsi plugin"
arch=("any")
url="http://fusiondirectory.org/"
license=("GPL")

depends=("fusiondirectory-schema>=$pkgver" "fusiondirectory-plugin-systems-schema>=$pkgver" "fusiondirectory-plugin-dns-schema>=$pkgver" "fusiondirectory-plugin-argonaut-schema>=$pkgver" "fusiondirectory-plugin-samba-schema>=$pkgver")

source=("https://repos.fusiondirectory.org/sources/fusiondirectory/fusiondirectory-plugins-${pkgver}.tar.gz"
"https://repos.fusiondirectory.org/sources/fusiondirectory/fusiondirectory-${pkgver}.tar.gz")
md5sums=('2a67d8454cfeed2b7805e96b5cf1b48a' '36b18a7f82f6e796ce20f815b449eab4')

package() {
cd ./fusiondirectory-plugins-${pkgver}
# Go in plugin directory
cd opsi/

    # Openldap section
    if [ -d ./contrib/openldap ] ; then
      mkdir -p ${pkgdir}/etc/openldap/schema/fusiondirectory/
      mkdir -p ${pkgdir}/usr/share/doc/fusiondirectory-plugin-opsi-schema/
      cp ../../fusiondirectory-${pkgver}/{AUTHORS.md,Changelog,COPYING} ${pkgdir}/usr/share/doc/fusiondirectory-plugin-opsi-schema/   
 
      # Directories
      for cur_openldap in $(find ./contrib/openldap -mindepth 1 -maxdepth 1 -type d) ; do
        openldap_line="$(echo ${cur_openldap} | sed "s#./contrib/openldap/##")" 
        cp -a ./contrib/openldap/${openldap_line} ${pkgdir}/etc/openldap/schema/fusiondirectory/
      done
    
      # Files
      for cur_openldap in $(find ./contrib/openldap -mindepth 1 -maxdepth 1 -type f ! -name "example.ldif" ) ; do
        openldap_line="$(echo ${cur_openldap} | sed "s#./contrib/openldap/##")" 
        cp -a ./contrib/openldap/${openldap_line} ${pkgdir}/etc/openldap/schema/fusiondirectory/
      done
    fi

}