You are not logged in.

#1 2010-04-26 16:37:34

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Console Keymap: Canada multi

Hi, I've imported the ubuntu canada multi keymap for the console. May be other people whant tis keymap to, so I just want to know: how I can make a AUR package to use an installation script that will download the keymap and install it. I can make a shell script, but it's the first time that I want to post something on AUR.


Thanks in advance!

Offline

#2 2010-04-26 19:06:53

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Console Keymap: Canada multi

Start with reading these:

PKGBUILD(5)
/usr/share/pacman/*
makepkg(8)
http://wiki.archlinux.org/index.php/Arc … _Standards
http://wiki.archlinux.org/index.php/AUR

Edit: Your package should not download and copy the keymap in at install time using the .install script. It should download and package the keymap at build time instead.

I assume that ubuntu actually have some sane license on the keymap.

Last edited by Mr.Elendig (2010-04-26 19:08:40)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2010-04-26 19:21:38

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

I'll check for the license then read the doc you gave me. I really think is an open one. I hope!

Last edited by Spationaute (2010-04-26 19:27:52)

Offline

#4 2010-04-26 19:33:35

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

Ok, as I read, I think I wouldn't need to script a download. I'll only put the keymap in the file as source. Or simply put it in the script, (scince is only a text gzipped).

Offline

#5 2010-04-26 20:03:14

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Console Keymap: Canada multi

...
source=('http://url/to/wherever/the/keypap/is/somekeymap.tar.gz')
...
build() {
  cd ${srcdir}/whatever
  ...
  install --flags --as --needed somekeymap.gz ${pkgdir}/usr/share/kbd/keymaps/i386/qwerty/somekeymap.gz
}

Something like that. Adapt and fill in the missing stuff as needed

Last edited by Mr.Elendig (2010-04-26 20:03:49)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#6 2010-04-26 20:08:26

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

Yes, I found that tongue
It's what I have now:

pkgname=ca_multi
pkgver=1.0
pkgrel=1
pkgdesc="The canada multi keymap for the console"
arch=('i686' 'i386')
url="http://stellaire.org/"
license=('GPL')
groups=(system)
depends=()
makedepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=('http://stellaire.org/arch/ca_multi.map.gz')
noextract=(ca_multi.map.gz)
md5sums=('d6608897bb40be38795adce7dadafc77')


build() {
  cd $srcdir
  cp ./ca_multi.map.gz /usr/share/kbd/keymaps/i386/qwerty
}

Offline

#7 2010-04-26 20:18:55

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

http://aur.archlinux.org/packages.php?ID=36754
I think I must add something like a sudo to make it work...

Last edited by Spationaute (2010-04-26 20:19:18)

Offline

#8 2010-04-26 20:30:55

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

Set and working!! Thank you! M.Elendig

pkgname=ca_multi
pkgver=1.0
pkgrel=1
pkgdesc="The canada multi keymap for the console"
arch=('i686' 'i386')
url="http://stellaire.org/"
license=('GPL')
groups=(system)
depends=()
makedepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=('http://stellaire.org/arch/ca_multi.map.gz')
noextract=(ca_multi.map.gz)
md5sums=('d6608897bb40be38795adce7dadafc77')


build() {
  cd $srcdir
  sudo install -v ./ca_multi.map.gz -t /usr/share/kbd/keymaps/i386/qwerty
}

Last edited by Spationaute (2010-04-26 20:31:21)

Offline

#9 2010-04-26 20:59:17

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

By the way, is it possible to add that keymap in the installation cd of aur? It's used by the francophone from Quebec (in Canada) as keyboard setting. Here, no one use canada-fr as default keymap tongue.

Offline

#10 2010-04-26 21:09:53

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: Console Keymap: Canada multi

No no no no!

You PKGBUILD is very wrong

Dont copy to /usr but to ${pkgdir}/usr without sudo! (this kill all the point you doing a PKGBUILD)

Read the posted doc.

EDIT.

From the pkgbuild from aur another thing, remove the echo "bla bla" and move it to a .install file. Quoted from wiki (from the link aready posted, you already read it, but I think you forget)

All important messages should be echoed during install using an .install file. For example, if a package needs extra setup to work, directions should be included.

Last edited by kazuo (2010-04-26 21:16:24)

Offline

#11 2010-04-26 21:17:34

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

Oups, sorry, its corrected kazuo. I use a .install now. but the ${pkgdir} trick dont work.

pkgname=ca_multi
pkgver=1.0
pkgrel=1
pkgdesc="The canada multi keymap for the console"
arch=('i686' 'i386')
url="http://stellaire.org/"
license=('GPL')
groups=(system)
depends=()
makedepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=('http://stellaire.org/arch/ca_multi.map.gz')
noextract=(ca_multi.map.gz)
md5sums=('d6608897bb40be38795adce7dadafc77')


build() {
  cd $srcdir
  install -v ./ca_multi.map.gz -t ${pkgdir}/usr/share/kbd/keymaps/i386/qwerty
}

Last edited by Spationaute (2010-04-26 21:32:30)

Offline

#12 2010-04-26 21:43:18

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: Console Keymap: Canada multi

the problem is with you install line, you need to create the dir before, try install -D for example

install -D -m644 ca_multi.map.gz ${pkgdir}/usr/share/kbd/keymaps/i386/qwerty

And remove the i386, Arch dont support i386, (you can use 'any', keymaps are independent of arch)

Last edited by kazuo (2010-04-26 21:46:15)

Offline

#13 2010-04-26 21:46:42

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

Last one, and I think the good one:

pkgname=ca_multi
pkgver=1.0
pkgrel=1
pkgdesc="The canada multi keymap for the console"
arch=('any')
url="http://stellaire.org/"
license=('GPL')
groups=(system)
depends=()
makedepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=('http://stellaire.org/arch/ca_multi.map.gz')
noextract=(ca_multi.map.gz)
md5sums=('d6608897bb40be38795adce7dadafc77')


build() {
  cd $srcdir
  mkdir -p ${pkgdir}/usr/share/kbd/keymaps/i386/qwerty/
  install -v ca_multi.map.gz ${pkgdir}/usr/share/kbd/keymaps/i386/qwerty/ || return 1
}

Thank for everybody help!

EDIT: Oups, I've posted in same time. Yes I've guessed that one. I've understood that AUR use a fakeroot environment and install tings after as you pathed it in the pkgdir. Thanks for the help! That was me first time.

Last edited by Spationaute (2010-04-26 21:51:42)

Offline

#14 2010-04-26 22:01:47

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

Did this is better? No download for my site!

pkgname=ca_multi
pkgver=1.0
pkgrel=1
pkgdesc="The canada multi keymap for the console"
arch=('any')
url="http://stellaire.org/"
license=('GPL')
groups=(system)
depends=()
makedepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=('http://stellaire.org/arch/ca_multi.map.gz')
noextract=(ca_multi.map.gz)
md5sums=('d6608897bb40be38795adce7dadafc77')


build() {
  cd $srcdir
  mkdir -p ${pkgdir}/usr/share/kbd/keymaps/i386/qwerty/
  echo 'keymaps 0-127 
keycode 1 = Escape ... to the end' >ca_multi.map
  gzip ca_multi.map
  install -v ca_multi.map.gz ${pkgdir}/usr/share/kbd/keymaps/i386/qwerty/ || return 1
}

Offline

#15 2010-07-14 18:29:27

Montague
Banned
Registered: 2010-06-24
Posts: 93

Re: Console Keymap: Canada multi

 

Last edited by Montague (2015-07-28 02:28:20)

Offline

#16 2010-07-15 03:35:34

Spationaute
Member
Registered: 2010-04-26
Posts: 11

Re: Console Keymap: Canada multi

Thanks Montague. I've added the x86_64 as compatible architecture.

The Wiki is correct. You do have  keymap in "/usr/share/kbd/keymaps/i386". Juste check my script wink it's installing it in! Making me think that if I want to install it on 64bits machine I must use uname -m...

Last edited by Spationaute (2010-07-15 03:44:49)

Offline

#17 2010-07-15 15:21:46

Montague
Banned
Registered: 2010-06-24
Posts: 93

Re: Console Keymap: Canada multi

 

Last edited by Montague (2015-07-28 02:28:59)

Offline

Board footer

Powered by FluxBB