spacepaste

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Contributor: Thomas Kinnen <thomas.kinnen@gmail.com>

pkgname=screen-git
pkgver=20111202
pkgrel=1
_ptygroup=5 #the UID of our PTY/TTY group
pkgdesc="GNU Screen from GIT repository. Provides vertical splitting."
url="http://www.gnu.org/software/screen/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('ncurses' 'pam')
provides=('screen')
conflicts=('screen')
backup=('etc/screenrc' 'etc/pam.d/screen')
makedepends=('git' 'automake' 'autoconf')
options=('!makeflags')
install='screen.install'
source=(screen.pam https://projects.archlinux.org/svntogit/packages.git/plain/screen/trunk/screen-4.0.3-long-term.patch)
md5sums=('1059ce8a6c6763838f395c917afe54cf'
         '2723c3e71d5a2e5a74b6ddbc5215ef0f')
_gitroot="git://git.savannah.gnu.org/screen.git"
_gitname="screen"


package() {
  cd ${srcdir}
  msg "Connecting to GIT server...."

  if [ -d ${srcdir}/$_gitname ] ; then
  	cd $_gitname && git pull origin
  	msg "The local files are updated."
  else
  	git clone $_gitroot
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting make..."

  cp -r ${srcdir}/$_gitname ${srcdir}/$_gitname-build

  cd ${srcdir}/$_gitname-build/src/

  patch -Np1 -i $srcdir/screen-4.0.3-long-term.patch


  export LDFLAGS="${LDFLAGS} -Wl,--as-needed"
  ./autogen.sh
  ./configure \
  		--prefix=/usr \
  		--enable-pam \
		--enable-colors256 \
	  	--enable-rxvt_osc --with-pty-group=$_ptygroup \
  		--mandir=/usr/share/man --infodir=/usr/share/info

  make || return 1
  make DESTDIR=${pkgdir} install || return 1
  install -Dm644 ${srcdir}/screen.pam ${pkgdir}/etc/pam.d/screen

  install -Dm644 etc/completer.zsh ${pkgdir}/usr/share/zsh/site-functions/screen
  install -Dm644 etc/etcscreenrc ${pkgdir}/etc/screenrc
  install -Dm644 etc/screenrc ${pkgdir}/etc/skel/.screenrc

  rm ${pkgdir}/usr/share/info/dir
  gzip -9 ${pkgdir}/usr/share/info/*

}