aboutsummaryrefslogtreecommitdiffstats
path: root/main/kbd/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/kbd/APKBUILD')
-rw-r--r--main/kbd/APKBUILD97
1 files changed, 97 insertions, 0 deletions
diff --git a/main/kbd/APKBUILD b/main/kbd/APKBUILD
new file mode 100644
index 0000000000..3a02a1e6c4
--- /dev/null
+++ b/main/kbd/APKBUILD
@@ -0,0 +1,97 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=kbd
+pkgver=1.15.3
+pkgrel=0
+pkgdesc="Tools for configuring the console (keyboard, virtual terminals, etc.)"
+url="http://ftp.altlinux.org/pub/people/legion/kbd"
+arch="all"
+license="GPLv2+"
+depends="kbd-misc"
+makedepends="bison flex autoconf automake"
+install=""
+subpackages="$pkgname-misc $pkgname-doc"
+source="ftp://ftp.altlinux.org/pub/people/legion/kbd/kbd-$pkgver.tar.gz
+ kbd-1.15-resizecon-x86_64.patch
+ kbd-1.15.3-loadkeys-d.patch
+ "
+
+_builddir="$srcdir"/kbd-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ aclocal -I m4 && autoreconf || return 1
+
+ # fixes from fedora
+ # 7-bit maps are obsolete; so are non-euro maps
+ cd "$_builddir"/data/keymaps/i386
+ mv qwerty/fi.map qwerty/fi-old.map
+ cp qwerty/fi-latin9.map qwerty/fi.map
+ cp qwerty/pt-latin9.map qwerty/pt.map
+ cp qwerty/sv-latin1.map qwerty/se-latin1.map
+
+ mv azerty/fr.map azerty/fr-old.map
+ cp azerty/fr-latin9.map azerty/fr.map
+
+ cp azerty/fr-latin9.map azerty/fr-latin0.map # legacy alias
+
+ # Rename conflicting keymaps
+ mv dvorak/no.map dvorak/no-dvorak.map
+ mv fgGIod/trf.map fgGIod/trf-fgGIod.map
+ mv olpc/es.map olpc/es-olpc.map
+ mv olpc/pt.map olpc/pt-olpc.map
+ mv qwerty/cz.map qwerty/cz-qwerty.map
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --datadir=/lib/kbd \
+ --localedir=/usr/share/locale \
+ --disable-nls \
+ --mandir=/usr/share/man \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+ rm -f "$pkgdir"/usr/lib/*.la
+
+ # ro_win.map.gz is useless
+ rm -f "$pkgdir"/lib/kbd/keymaps/i386/qwerty/ro_win.map.gz
+
+ # Create additional name for Serbian latin keyboard
+ ln -s sr-cy.map.gz "$pkgdir"/lib/kbd/keymaps/i386/qwerty/sr-latin.map.gz
+
+ # The rhpl keyboard layout table is indexed by kbd layout names,
+ # so we need a Korean keyboard
+ ln -s us.map.gz "$pkgdir"/lib/kbd/keymaps/i386/qwerty/ko.map.gz
+
+ # Move binaries which we use before /usr is mounted to /bin.
+ mkdir -p "$pkgdir"/bin
+ for binary in setfont dumpkeys kbd_mode unicode_start unicode_stop loadkeys ; do
+ mv "$pkgdir"/usr/bin/$binary "$pkgdir"/bin/ || return 1
+ done
+
+ # Link open to openvt
+ ln -s openvt "$pkgdir"/usr/bin/open
+
+}
+
+misc() {
+ pkgdesc="Data for kbd package"
+ arch="noarch"
+ mkdir -p "$subpkgdir"/lib
+ mv "$pkgdir"/lib/kbd "$subpkgdir"/lib/
+}
+
+md5sums="8143e179a0f3c25646ce5085e8777200 kbd-1.15.3.tar.gz
+435755fb51017b17558f38a2a2c5074c kbd-1.15-resizecon-x86_64.patch
+d7bb334afc00f7794774762a07dacaa7 kbd-1.15.3-loadkeys-d.patch"