aboutsummaryrefslogtreecommitdiff
path: root/base/framebuffer/framebuffer.build
blob: c3c8ce628de7c05b7654e62bff9995e67d7c05ef (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
#
# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd>

source /usr/src/ports/Build/build.sh

NAME=framebuffer
VERSION=$(date +%Y%m%d)
BUILD=1

# Description

cat > ${PKG}/install/slack-desc <<EOF
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.

$(padd)|-----handy-ruler------------------------------------------------------|
${NAME}: framebuffer
${NAME}:
${NAME}: The Linux framebuffer makes it possible to use the console in 
${NAME}: graphics mode which allows among other things to have large
${NAME}: consoles. This package includes the following framebuffer utilities:
${NAME}:
${NAME}:   * fbset (view and change framebuffer settings)
${NAME}:   * fbi (display images)
${NAME}:   * fbcat (dump the console screen to a file)
${NAME}:
${NAME}:
EOF

cat > ${PKG}/install/doinst.sh <<EOF
#!/bin/sh

config() {
  NEW="\$1"
  OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
  # If there's no config file by that name, mv it over:
  if [ ! -r \$OLD ]; then
    mv \$NEW \$OLD
  elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then
    # toss the redundant copy
    rm \$NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}

config etc/fb.modes.new
EOF

# Sources

SRCNAME[0]=fbset
SRCVERS[0]=2.1
SRCPACK[0]=http://users.telenet.be/geertu/Linux/fbdev/${SRCNAME[0]}-${SRCVERS[0]}.tar.gz
SRCCOPY[0]="GPL2"

build0()
{
make ${JOBS} CFLAGS="${FLAGS}"
make install DESTDIR="${PKG}" PREFIX="${SYS_DIR[usr]}" MANDIR="${SYS_DIR[man]}"
doc etc/fb.modes.{Falcon,NTSC,PAL,ATI}
install.dir ${PKG}${SYS_DIR[etc]}
install.cfg etc/fb.modes.ATI ${PKG}${SYS_DIR[etc]}/fb.modes.new
}

SRCNAME[1]=fbida
SRCVERS[1]=2.09
SRCPACK[1]=http://dl.bytesex.org/releases/fbida/${SRCNAME[1]}-${SRCVERS[1]}.tar.gz
SRCCOPY[1]="GPL2"

build1()
{
make ${JOBS} verbose=yes OPTS="${FLAGS}"
make install DESTDIR="${PKG}" prefix="${SYS_DIR[usr]}"
changelog Changes
rm -f \
 ${PKG}${SYS_DIR[bin]}/{fbgs,exiftran} \
 ${PKG}${SYS_DIR[man]}/man1/{fbgs,exiftran}.1
}

SRCNAME[2]=fbcat
SRCVERS[2]=0.3
SRCPACK[2]=http://fbcat.googlecode.com/files/${SRCNAME[2]}-${SRCVERS[2]}.tar.gz
SRCCOPY[2]="GPL2"

build2()
{
make ${JOBS} CFLAGS="${FLAGS}"
changelog doc/changelog
install.dir ${PKG}${SYS_DIR[bin]}
install.bin fb{cat,grab} ${PKG}${SYS_DIR[bin]}
install.dir ${PKG}${SYS_DIR[man]}/man1
install.man doc/fb{cat,grab}.1 ${PKG}${SYS_DIR[man]}/man1
}