- new
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 10 Sep 2010 11:54:03 +0000 (11:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dokuwiki-plugin-ldapsearch.spec -> 1.1
    pass-by-reference.patch -> 1.1

dokuwiki-plugin-ldapsearch.spec [new file with mode: 0644]
pass-by-reference.patch [new file with mode: 0644]

diff --git a/dokuwiki-plugin-ldapsearch.spec b/dokuwiki-plugin-ldapsearch.spec
new file mode 100644 (file)
index 0000000..86129f7
--- /dev/null
@@ -0,0 +1,53 @@
+%define                plugin          ldapsearch
+Summary:       Dokuwiki plugin to search LDAP directories for values
+Name:          dokuwiki-plugin-%{plugin}
+Version:       20090601
+Release:       0.1
+License:       GPL v2
+Group:         Applications/WWW
+Source0:       http://freecode.baselineit.net/dokuwiki/ldapsearch-latest.zip
+# Source0-md5: 9822e7d7a6dae69534ac645444c4258d
+Patch0:                pass-by-reference.patch
+URL:           http://www.dokuwiki.org/plugin:ldapsearch
+BuildRequires: rpmbuild(macros) >= 1.520
+Requires:      dokuwiki >= 20061106
+Requires:      php-ldap
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                dokuconf        /etc/webapps/dokuwiki
+%define                dokudir         /usr/share/dokuwiki
+%define                plugindir       %{dokudir}/lib/plugins/%{plugin}
+%define                find_lang       %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
+
+%description
+This plugin allows you to search LDAP directories for values (like
+telephone numbers) from within your page.
+
+%prep
+%setup -qc
+mv %{plugin}/* .
+%patch0 -p1
+
+version=$(awk -F"'" '/date/{print $4}' syntax.php)
+if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
+       : %%{version} mismatch
+       exit 1
+fi
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{plugindir}
+cp -a . $RPM_BUILD_ROOT%{plugindir}
+
+# find locales
+%find_lang %{name}.lang
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f %{name}.lang
+%defattr(644,root,root,755)
+%dir %{plugindir}
+%{plugindir}/*.php
+%{plugindir}/conf
diff --git a/pass-by-reference.patch b/pass-by-reference.patch
new file mode 100644 (file)
index 0000000..72ff5b7
--- /dev/null
@@ -0,0 +1,20 @@
+--- dokuwiki-plugin-ldapsearch-20090601/syntax.php     2009-06-01 21:07:10.000000000 +0300
++++ ldapsearch/syntax.php      2010-09-10 14:47:50.078973905 +0300
+@@ -53,7 +53,7 @@
+               switch ($state) {
+                       case DOKU_LEXER_SPECIAL : {
+                               $matches = array();
+-                              if(preg_match("/$urlSyntax/",$match,&$matches)) {
++                              if(preg_match("/$urlSyntax/",$match,$matches)) {
+                                       $ldapDetails = array(
+                                                               'hostname' => $matches[1],
+                                                               'port' => $matches[2],
+@@ -64,7 +64,7 @@
+                                                       );
+                                       $data = array( 'result' => null, 'ldapDetails' => $ldapDetails );
+                                       return array($state, $data);          
+-                              } elseif(preg_match_all("/$paramSyntax/",$match,&$matches, PREG_SET_ORDER)) {
++                              } elseif(preg_match_all("/$paramSyntax/",$match,$matches, PREG_SET_ORDER)) {
+                                       $ldapDetails = array();
+                                       foreach($matches as $pair) {
+                                               $value = preg_replace('/^"(.*?)"$/','$1',$pair[2]);
This page took 0.06815 seconds and 4 git commands to generate.