diff options
author | Chris Severance | 2018-11-20 14:51:43 -0500 |
---|---|---|
committer | Chris Severance | 2018-11-20 14:51:43 -0500 |
commit | 1ee4bef129781bf82eebcf08bdd2f1b361489fd2 (patch) | |
tree | 4c3351215d79319c7e8d31a0aa756c0d9f3b50bb | |
parent | 426ddb2cb03b95fb2b650220a258049eb29d1137 (diff) | |
download | aur-1ee4bef129781bf82eebcf08bdd2f1b361489fd2.tar.gz |
autu: Update to 1.0.0_1-1 Improve PKGBUILD
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 30 |
2 files changed, 18 insertions, 14 deletions
@@ -1,5 +1,5 @@ # Generated by mksrcinfo v8 -# Tue Nov 20 08:33:55 UTC 2018 +# Tue Nov 20 19:51:43 UTC 2018 pkgbase = brother-mfc-420cn pkgdesc = LPR and CUPS driver for the Brother MFC-420CN printer pkgver = 1.0.0_1 @@ -217,26 +217,16 @@ build() { test "${_nppdfound}" -ne 0 || echo "${}" test "${_ncodefound}" -ne 0 || echo "${}" - set +u + set +u } -package() { - set -u - - local _dir - # /var/spool is not used anywhere in this package. Maybe it's needed for non cups lprng. - for _dir in 'usr' 'opt'; do # 'var' - if [ -d "${srcdir}/${_dir}" ]; then - cp -pR "${srcdir}/${_dir}" "${pkgdir}" - fi - done - +_fn_libconflict() { # Change lib name to prevent conflicts with other printers that use the same one local _f1='libbrcompij2' local _f2="${_f1}-${_brotherlnd}" local _fp='' # blank enables name change, pound sign # disables - # Execute LPR POSTIN. These libs will probably cause a conflict with other printers. + # Execute ln soname commands from postin if [ "${_opt_DEB}" -ne 0 ]; then local _postin='debextract.2/postinst' else @@ -256,6 +246,20 @@ package() { patchelf --replace-needed "${_f1}.so.1" "${_f2}.so.1" "${pkgdir}/usr/share/${_conflict}/lpd/rastertobrij2" patchelf --set-soname "${_f2}.so.1" "${pkgdir}/usr/lib/${_f2}.so.1.0.2" fi +} + +package() { + set -u + + local _dir + # /var/spool is not used anywhere in this package. Maybe it's needed for non cups lprng. + for _dir in 'usr' 'opt'; do # 'var' + if [ -d "${srcdir}/${_dir}" ]; then + cp -pR "${srcdir}/${_dir}" "${pkgdir}" + fi + done + + _fn_libconflict # Ensure we got a ppd and a filter for CUPS test ! -z "$(find "${pkgdir}/usr/share/cups/model" -type 'f' -name '*.ppd')" || echo "${}" |