summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f4b6c2084c95a3470cce71ac0c9200534e237f5f (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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Maintainer: dreieck

# PKGBUILD last time manually edited: At least on 2018-04-20.

_pkgname=pentaxpj-filter
pkgname="${_pkgname}"
epoch=0
_pkgver=1.0.0
pkgver="${_pkgver}"
pkgrel=7
pkgdesc="Printer filter for Pentax PocketJet 200 and PocketJet II printers. Needed in addition to the PPDs/ files that come with foomatic-db/ CUPS. Includes printer documentation."
arch=('i686' 'x86_64')
url="http://web.archive.org/web/20191225160215/http://ww1.pragana.net/gdiprinters.html#pentaxpj"
license=(
  'GPL-2.0-only'
  'LicenseRef-custom:proprietary'
)

# groups=(
#         "pentaxpj"
#        )

depends=(
  "bash"
  "ghostscript"
  "glibc"
)

makedepends=(
  "gzip"
  # "tk"
)

optdepends=(
  "tk: For GUI to change config file for LPD usage."
)

provides=(
  # "${_pkgname}=${pkgver}"
  "pentax-pocketjet-2-manual=2004"
)

# conflicts=(
  # "${_pkgname}"
# )

# replaces=(
  # "${_pkgname}<=${pkgver}"
# )

backup=(
  "etc/pentaxpj.conf"
)

install="${_pkgname}.install"

_target="pentaxpj-${_pkgver}.tar.gz"

source=(
  "${_target}::http://web.archive.org/web/20160517131113if_/http://ww1.pragana.net/pentaxpj-${_pkgver}.tar.gz"
  "pentaxpj.conf.a4"
  "pentaxpj.conf.letter"
  "Pentax_PocketJet_II_and_PocketJet_200_users_guide.pdf::http://web.archive.org/web/20071017093018/http://www.megatron.fr/imprimantes/pdf/manuels/thermal/pentax/doc_pocketjet_II-200_user_guide_e.pdf"
  "${install}"
  "license_users-guide_info.txt"
)

sha256sums=(
  "e1ea36e1cdfcc733c69709717fb1ed97f2fd0f3e3a12197309277007df1b819b"
  "402f62fef43ca1738d7ba8e7729864326ca138fa5a57fb0b46611f05585ed4c4"
  "a2e25b291591b31b215a7001308f76b1ea7ece2eb803a7258f821bae1223c51a"
  "ab714ff7dac4cf61261b63836cc238873936c0816b5978d265acf49ffcb3cfcc"
  "348c4ba58e0dfaf49db9bee73f55f6ac049d084e9cc19df81950c0cf1f65eecc"
  "385590851fdc8464f0cb844f0d93e2b625ee46772ce8fad9d287d640db7e9fc2"
)

options+=('emptydirs')

build() {
  cd "${srcdir}/pentaxpj"
  
  make
  
  gunzip test-page.ps.gz
  gzip -9 test-page.ps
}

package() {
  _instdirbase="/opt/${_pkgname}"
  _instdir="${pkgdir}/${_instdirbase}"
  _bindirbase="/usr/bin"
  _bindir="${pkgdir}/${_bindirbase}"
  _filterdirbase="/usr/lib/cups/filter"
  _filterdir="${pkgdir}/${_filterdirbase}"
  _spooldirbase="/var/spool/lpd"
  _spooldir="${pkgdir}/${_spooldirbase}"
  _etcdirbase="/etc"
  _etcdir="${pkgdir}/${_etcdirbase}"
  _docdirbase="/usr/share/doc/${_pkgname}"
  _docdir="${pkgdir}/${_docdirbase}"
  _licensedirbase="/usr/share/licenses/${pkgname}"
  _licensedir="${pkgdir}/${_licensedirbase}"
  _pixmapdirbase="/usr/share/pixmaps"
  _pixmapdir="${pkgdir}/${_pixmapdirbase}"
  
  cd "${_srcdir}"
  
  install -v -d -m755 "${_instdir}"
  (
    cd pentaxpj
    for _target in BWidget-* pentax.xpm pentaxpj pentaxpj_sh pentaxsetup test-page.ps.gz; do
      cp -av "${_target}" "${_instdir}"/
    done
    chown root:lp "${_instdir}"/{pentaxsetup,pentaxpj,pentaxpj_sh}
    chmod 754 "${_instdir}"/pentaxsetup
    chmod 755 "${_instdir}"/{pentaxpj,pentaxpj_sh}

    install -v -D -m644 README "${_docdir}"/README#

    install -v -D -m644 pentax.xpm "${_pixmapdir}/pentaxpj.xpm"
  )
  
  for _docfile in pentaxpj.conf.* Pentax_PocketJet_II_and_PocketJet_200_users_guide.pdf; do
    install -v -D -m644 "${srcdir}/${_docfile}" "${_docdir}/${_docfile}"
  done
  
  install -v -d -m755 "${_docdir}"
  ln -sv "${_instdirbase}"/test-page.ps.gz "${_docdir}"/test-page.ps.gz
  
  install -v -D -m664 pentaxpj.conf.a4 "${_etcdir}"/pentaxpj.conf
  
  install -v -d -m755 "${_bindir}"
  ln -sv "${_instdirbase}"/pentaxpj_sh "${_bindir}"/pentaxpj_sh
  ln -sv "${_instdirbase}"/pentaxpj "${_bindir}"/pentaxpj
  ln -sv "${_instdirbase}"/pentaxsetup "${_bindir}"/pentaxsetup
  
  install -v -d -m755 "${_filterdir}"
  ln -sv "${_instdirbase}"/pentaxpj_sh "${_filterdir}"/pentaxpj_sh
  
  install -v -D -m644 license_users-guide_info.txt ${_licensedir}/license_users-guide_info.txt
  
  install -v -d -m775 -g lp "${_spooldir}"
}