8.111. libidn2-2.3.8

libidn2 is a package designed for internationalized string handling based on standards from the Internet Engineering Task Force (IETF)'s IDN working group, designed for internationalized domain names.

Approximate build time: 0.1 SBU
Required disk space: 21 MB

8.111.1. Installation of libidn2

Create the PKGBUILD for the libidn2 package with the following commands:

mkdir /sources/libidn2
cd /sources/libidn2
cat > PKGBUILD << "REALEOF"
# Maintainer: Linux From Scratch <lfs-dev@lists.linuxfromscratch.org>

pkgname="libidn2"
pkgver="2.3.8"
pkgrel="1"
pkgdesc="A library for internationalized string handling based on standards from the IETF IDN working group"
arch=('x86'
      'x86_64')
url="https://www.gnu.org/software/libidn2/"
groups=('core')
license=('GPLv2'
         'LGPLv3')
depends=('libunistring'
         'glibc'
         'rootfs')
makedepends=('bash'
             'binutils'
             'coreutils'
             'diffutils'
             'gawk'
             'gcc'
             'grep'
             'make'
             'sed')
source=('https://ftp.gnu.org/gnu/libidn/libidn2-2.3.8.tar.gz')
md5sums=('a8e113e040d57a523684e141970eea7a')

build() {
  cd "${pkgname}-${pkgver}"
  ./configure --prefix=/usr --disable-static
  make
}

package(){
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
REALEOF

Prepare the build directory for the pacman user and build the package:

chown -R root:pacman .
chmod 2775 .
chmod 664 PKGBUILD
su pacman -c 'makepkg -L --nodeps'

Add the newly created package to the central package repository:

cp libidn2-2.3.8-1-$(uname -m).pkg.tar.xz \
   /srv/pacman/repos/LFS/
repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
         /srv/pacman/repos/LFS/libidn2-2.3.8-1-$(uname -m).pkg.tar.xz

Update the local cache and install the libidn2 package:

pacman -Syu
pacman -S libidn2 --overwrite \* -dd --noconfirm

Finally, copy the source files into the source repository and clean up the build directory:

mkdir /srv/pacman/source/LFS/libidn2
cp PKGBUILD /srv/pacman/source/LFS/libidn2
cd /sources
rm -rf libidn2

8.111.2. Contents

Installed Program: idn2
Installed Library: libidn2.so
Installed Directory: /usr/share/gtk-doc/html/libidn2

Short Descriptions

idn2

is a command line interface to the internationalized domain library

libidn2

contains a generic Stringprep implementation used for internationalized string handling