michael@564: ## michael@564: ## libidn.spec -- OpenPKG RPM Package Specification michael@564: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@564: ## michael@564: ## Permission to use, copy, modify, and distribute this software for michael@564: ## any purpose with or without fee is hereby granted, provided that michael@564: ## the above copyright notice and this permission notice appear in all michael@564: ## copies. michael@564: ## michael@564: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@564: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@564: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@564: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@564: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@564: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@564: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@564: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@564: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@564: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@564: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@564: ## SUCH DAMAGE. michael@564: ## michael@564: michael@564: # package information michael@564: Name: libidn michael@564: Summary: International Domain Name (IDN) Library michael@564: URL: http://www.gnu.org/software/libidn/ michael@564: Vendor: Simon Josefsson michael@564: Packager: OpenPKG Foundation e.V. michael@564: Distribution: OpenPKG Community michael@564: Class: BASE michael@564: Group: DNS michael@564: License: LGPL michael@564: Version: 1.25 michael@565: Release: 20120800 michael@564: michael@564: # list of sources michael@564: Source0: ftp://ftp.gnu.org/pub/gnu/libidn/libidn-%{version}.tar.gz michael@564: Patch0: libidn.patch michael@564: michael@564: # build information michael@565: BuildPreReq: OpenPKG, openpkg >= 20100101, make michael@564: PreReq: OpenPKG, openpkg >= 20100101 michael@564: BuildPreReq: libiconv michael@564: PreReq: libiconv michael@564: michael@564: %description michael@564: GNU Libidn is an implementation of the Stringprep, Punycode and michael@564: IDNA specifications defined by the IETF Internationalized Domain michael@564: Names (IDN) working group, used for internationalized domain names. michael@564: The library contains a generic Stringprep implementation that michael@564: does Unicode 3.2 NFKC normalization, mapping and prohibitation of michael@564: characters, and bidirectional character handling. Profiles for michael@564: iSCSI, Kerberos 5, Nameprep, SASL and XMPP are included. Punycode michael@564: and ASCII Compatible Encoding (ACE) via IDNA are supported. The michael@564: Stringprep API consists of two main functions, one for converting michael@564: data from the system's native representation into UTF-8, and michael@564: one function to perform the Stringprep processing. Adding a michael@564: new Stringprep profile for your application within the API is michael@564: straightforward. The Punycode API consists of one encoding function michael@564: and one decoding function. The IDNA API consists of the ToASCII michael@565: and ToUnicode functions, as well as an high level interface for michael@564: converting entire domain names to and from the ACE encoded form. michael@564: michael@564: %track michael@564: prog libidn = { michael@564: version = %{version} michael@564: url = ftp://ftp.gnu.org/pub/gnu/libidn/ michael@564: regex = libidn-(__VER__)\.tar\.gz michael@564: } michael@564: michael@564: %prep michael@564: %setup -q michael@564: %patch -p0 michael@564: %{l_shtool} subst \ michael@564: -e 's;^\(SUBDIRS = .*\) doc \(.*\)$;\1 \2;' \ michael@564: Makefile.in michael@564: %{l_shtool} subst \ michael@564: -e 's;^\(Libs: -L${libdir} -lidn\)$;\1 @LTLIBICONV@;' \ michael@564: libidn.pc.in michael@565: %{l_shtool} subst \ michael@565: -e 's;^\(const gchar \*const g_utf8_skip\);static \1;' \ michael@565: lib/nfkc.c michael@564: michael@564: %build michael@564: CC="%{l_cc}" \ michael@564: CFLAGS="%{l_cflags -O}" \ michael@564: CPPFLAGS="%{l_cppflags}" \ michael@564: LDFLAGS="%{l_ldflags}" \ michael@564: MAKEINFO="true" \ michael@564: GREP=grep \ michael@564: ./configure \ michael@564: --prefix=%{l_prefix} \ michael@564: --includedir=%{l_prefix}/include/libidn \ michael@564: --with-libiconv-prefix=%{l_prefix} \ michael@564: --disable-shared \ michael@564: --disable-nls michael@564: %{l_make} %{l_mflags -O} michael@564: michael@564: %install michael@565: %{l_make} %{l_mflags} install DESTDIR="$RPM_BUILD_ROOT" michael@564: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true michael@564: rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir michael@564: rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/emacs michael@564: rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/Libidn.dll michael@564: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@564: %{l_files_std} michael@564: michael@564: %files -f files michael@564: michael@564: %clean michael@564: