summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiao-Long Chen2015-06-08 20:49:40 -0400
committerXiao-Long Chen2015-06-08 20:49:40 -0400
commitaf1cfa2cadcc081ab79ccd2aa66483b86f6909ae (patch)
treee4e9acd3ea58f576ddd272ed2283a5b8edf7397e
downloadaur-af1cfa2cadcc081ab79ccd2aa66483b86f6909ae.tar.gz
Import from old AUR
-rw-r--r--.SRCINFO19
-rw-r--r--Makefile.PL.rpm97
-rw-r--r--PKGBUILD38
3 files changed, 154 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..11db69c8f2bc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = perl-mozldap
+ pkgdesc = LDAP Perl module that wraps the OpenLDAP C SDK
+ pkgver = 1.5.3
+ pkgrel = 1
+ url = http://www.mozilla.org/directory/perldap.html
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ license = MPL
+ depends = mozldap
+ depends = openldap
+ source = ftp://ftp.mozilla.org/pub/mozilla.org/directory/perldap/releases/1.5.3/src/perl-mozldap-1.5.3.tar.gz
+ source = Makefile.PL.rpm
+ sha512sums = 41a6913222cde9be4dc85a6406b0a499954500a38e74e5367f150191f0ea186162b5cd66a2655240909a4d5cc9df820e349e37e73c8549f83d084d96f8f74375
+ sha512sums = 0cb51bc94cba8ca257607debc8eef2fc1457fe074ba45d7978767a8e22c913b28e87e4c186e05b716e5b14b7ca2990b87d57c858e5e9215f8e4252ff9520ab86
+
+pkgname = perl-mozldap
+
diff --git a/Makefile.PL.rpm b/Makefile.PL.rpm
new file mode 100644
index 000000000000..af6421019a34
--- /dev/null
+++ b/Makefile.PL.rpm
@@ -0,0 +1,97 @@
+#############################################################################
+# $Id: Makefile.PL.rpm,v 1.1.2.1 2007/01/10 18:01:48 richm%stanfordalumni.org Exp $
+#
+# The contents of this file are subject to the Mozilla Public License
+# Version 1.1 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is PerLDAP. The Initial Developer of the Original
+# Code is Netscape Communications Corp. and Clayton Donley. Portions
+# created by Netscape are Copyright (C) Netscape Communications
+# Corp., portions created by Clayton Donley are Copyright (C) Clayton
+# Donley, portions created by Leif Hedstrom are Copyright (C) Leif
+# Hedstrom. All Rights Reserved.
+#
+# Contributor(s):
+# * Leif Hedstrom <leif@perldap.org>
+#
+# DESCRIPTION
+# The Makefile "source".
+# This has been heavily modified to simply use pkg-config
+# to get the components necessary to build.
+#
+#############################################################################
+
+require 5.005;
+
+use ExtUtils::MakeMaker;
+use ExtUtils::Liblist;
+use Config;
+use Carp;
+
+# name of package to use for pkg-config
+$ldappkgname = $ENV{"LDAPPKGNAME"} || "mozldap6";
+my ($DEFINES, $cflags, $libs);
+if (lc($ldappkgname) eq 'openldap') {
+ $cflags = `pkg-config --cflags nss`;
+ chomp($cflags);
+ $libs = `pkg-config --libs nss`;
+ chomp($libs);
+ $libs = "-lldap -llber $libs";
+ $DEFINES = "-DUSE_OPENLDAP -DUSE_SSL -DPRLDAP";
+} else {
+ $cflags = `pkg-config --cflags $ldappkgname`;
+ chomp($cflags);
+ $libs = `pkg-config --libs $ldappkgname`;
+ chomp($libs);
+ $DEFINES = "-DUSE_SSL -DPRLDAP";
+}
+print "\nPerLDAP - Perl 5 Module for LDAP\n";
+print "================================\n";
+print "Using CFLAGS = $cflags\n";
+print "================================\n";
+print "Using LIBS = $libs\n";
+
+#
+# Ok, let's do it!
+#
+print "\n######### before WriteMakefile #############\n";
+WriteMakefile(
+ 'ABSTRACT' => 'Perl methods for LDAP C API calls',
+ 'AUTHOR' => 'Leif Hedstrom <leif@ogre.com>',
+ 'NAME' => 'Mozilla::LDAP::API',
+ 'DISTNAME' => 'PerLDAP',
+
+ 'VERSION_FROM' => 'API.pm',
+ 'INC' => $cflags,
+ 'LIBS' => [$libs],
+ 'MYEXTLIB' => $my_extlib,
+ 'DEFINE' => $DEFINES,
+ 'XSOPT' => "-nolinenumbers",
+ @extras
+);
+
+print "\n######### after WriteMakefile #############\n";
+
+#
+# Generate a "make HTML" target
+#
+sub MY::postamble
+{
+ '
+.SUFFIXES: .pm .html
+.PHONY: html
+
+.pm.html:
+ pod2html --netscape $< > $@
+
+html: Entry.html Conn.html Utils.html API.html LDIF.html $(FIRST_MAKEFILE)
+ @rm -f pod2html-itemcache pod2html-dircache
+'
+}
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..71f46d7fb391
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
+
+# Based on Fedora's perl-Mozilla-LDAP fedpkg repo
+# (commit: 90a54c061c9424ac80ace1915dae2f65f71d7b3c)
+
+pkgname=perl-mozldap
+pkgver=1.5.3
+pkgrel=1
+pkgdesc="LDAP Perl module that wraps the OpenLDAP C SDK"
+arch=(i686 x86_64)
+url="http://www.mozilla.org/directory/perldap.html"
+license=(GPL LGPL MPL)
+depends=(mozldap openldap)
+source=("ftp://ftp.mozilla.org/pub/mozilla.org/directory/perldap/releases/${pkgver}/src/${pkgname}-${pkgver}.tar.gz"
+ Makefile.PL.rpm)
+sha512sums=('41a6913222cde9be4dc85a6406b0a499954500a38e74e5367f150191f0ea186162b5cd66a2655240909a4d5cc9df820e349e37e73c8549f83d084d96f8f74375'
+ '0cb51bc94cba8ca257607debc8eef2fc1457fe074ba45d7978767a8e22c913b28e87e4c186e05b716e5b14b7ca2990b87d57c858e5e9215f8e4252ff9520ab86')
+
+build() {
+ cd "${pkgname}-${pkgver}"
+
+ LDAPPKGNAME=openldap \
+ perl ../Makefile.PL.rpm \
+ PREFIX=/usr INSTALLDIRS=vendor < /dev/null
+ make OPTIMIZE="${CFLAGS}"
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ make test
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}/" install
+
+ find "${pkgdir}" -name API.so -exec chmod 755 {} \;
+}