summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 086dd9defd7f6ad51ee9b54198a22f62fdc17194 (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
# Maintainer: fitu996 <fitu996 _at_ gmail _dot_ com>
# Maintainer: flan_suse <windows2linux_AT_zoho_DOT_com>
# Contributor: Eric BĂ©langer <eric@archlinux.org>
# Contributor: C2D6@aur (PKGBUILD improvements)
# Contributor: Scott Alfter <scott@alfter.us> (patch to build with newer glib2)

#       NOTE: Previous versions of this PKGBUILD contained an unused signature file.
#       If you wish you validate the source file against its signature,
#       please import the developer's public key (E3AFE70396CCC0D9E5D8381CB0DBCA7D64F770B2),
#       and use their signed file (.gpg) found on the upstream website (https://dvdisaster.jcea.es/index.html).

pkgname=dvdisaster
pkgver=0.79.10
pkgrel=4
provides=('dvdisaster')
pkgdesc="Provides a margin of safety against data loss on newly created ISO, CD, DVD, BDR, and M-Disc media caused by aging or scratches"
arch=('x86_64')
url="https://dvdisaster.jcea.es"
license=('GPL')
depends=('gtk2')
options=('!makeflags')
source=(${pkgname}-${pkgver}.tar.bz2::${url}/downloads/${pkgname}-${pkgver}.tar.bz2 bash-based-configure.patch)
# Upstream only publishes an MD5 hash, which is why MD5 is specfically used in this checksum array
md5sums=('e913b8375a2bd41a55df7f53379f8d0d'
         'f5d1737310b6d84a84c1cdb38c264c81')

prepare()
{
  cd ${pkgname}-${pkgver}
  # Apply patch to fix issue for building with newer glib2
  patch -p1 -i ${srcdir}/bash-based-configure.patch
}

build() {
  export CFLAGS="$CFLAGS -fcommon"
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
    --mandir=/usr/share/man \
    --docdir=/usr/share/doc \
    --localedir=/usr/share/locale \
    --with-nls=yes \
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make BUILDROOT="${pkgdir}" install
  # Remove unnecessary uninstaller script
  rm -f "${pkgdir}/usr/bin/dvdisaster-uninstall.sh"
  # Copy .desktop file to standard applications directory
  install -D -m 644 contrib/dvdisaster.desktop "${pkgdir}/usr/share/applications/dvdisaster.desktop"
  # Rename all .png icons to strip their resolution from their names, and place them in the proper standard icon subdirectories
  for i in 16 24 32 48 64 ; do
    install -D -m 644 contrib/dvdisaster${i}.png "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/dvdisaster.png"
  done
}