summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bd7099da45f9cdfecac251a88e9509190f14b4e4 (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
#
# PKGBUILD for sidfactory2 (SID Factory II))
#
# Maintainer: Uffe Jakobsen <microtop@starion.dk>
#
# blog: http://blog.chordian.net/sf2/
# github: https://github.com/Chordian/sidfactory2
#

_pkgname=sidfactory2
_pkgver=20231002
#_commit=8a5dc723da875ba31e361f64c9de415525fd0e35


pkg_ident="release-${_pkgver//_/-}"
pkg_name_ver="${_pkgname}-${_pkgver//_/-}"
pkg_name_dir="${_pkgname}-release-${_pkgver}"

#pkg_ident="${_commit}"
#pkg_name_ver="${_pkgname}-${_commit}"
#pkg_name_dir="${pkg_name_ver}"

pkgname=${_pkgname}
pkgver=${_pkgver}
pkgrel=2
pkgdesc="Cross-platform editor for composing music for the Commodore C64 SID chip"
arch=('i686' 'x86_64')
url="https://github.com/Chordian/sidfactory2"
license=('GPL')
makedepends=('pkgconfig' 'make' 'gcc')
depends=('sdl2')
optdepends=()
conflicts=('sidfactory2')

#
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/Chordian/${_pkgname}/archive/${pkg_ident}.tar.gz")

#
sha256sums=('bb8e421895979526ccfed4f176831d02077b43d10ef97308a08e988aa9c6a314')


#
#
#
prepare()
{
  cd "${srcdir}/${pkg_name_dir}"
  #cp "${startdir}/Makefile.sf2" Makefile
  #patch -b -p0 < "${startdir}/patch-Makefile.diff"
}

#
#
#
build()
{
  cd "${srcdir}/${pkg_name_dir}"
  make
}

#
#
#
package()
{
  cd "${srcdir}/${pkg_name_dir}"
  #make dist

  #install -m 755 -D "${srcdir}/${pkg_name_dir}/artifacts/SIDFactoryII" "${pkgdir}/usr/bin/SIDFactoryII.exe"
  #ln -sf SIDFactoryII "${pkgdir}/usr/bin/sidfactory2"
  #ln -sf sf2 "${pkgdir}/usr/bin/sidfactory2"

  #for aa in "${srcdir}/${pkg_name_dir}/dist/documentation/"*.txt; do
  #  aaa=$(basename "${aa}")
  #  install -m 644 -D "${aa}" "${pkgdir}/usr/share/doc/${pkgname}/${aaa}"
  #done

  mkdir -p "${pkgdir}/usr/share/doc/${pkgname}/"
  cp -R "${srcdir}/${pkg_name_dir}/dist/documentation/"* "${pkgdir}/usr/share/doc/${pkgname}/"

  install -m 755 -d "${pkgdir}/usr/share/${pkgname}"
  cp -R "${srcdir}/${pkg_name_dir}/artifacts/config" "${pkgdir}/usr/share/${pkgname}"
  cp -R "${srcdir}/${pkg_name_dir}/artifacts/drivers" "${pkgdir}/usr/share/${pkgname}"
  cp -R "${srcdir}/${pkg_name_dir}/artifacts/overlay" "${pkgdir}/usr/share/${pkgname}"
  cp -R "${srcdir}/${pkg_name_dir}/artifacts/color_schemes" "${pkgdir}/usr/share/${pkgname}"
  #cp -R "${srcdir}/${pkg_name_dir}/artifacts/music" "${pkgdir}/usr/share/${pkgname}"
  cp -R "${srcdir}/${pkg_name_dir}/SIDFactoryII/music" "${pkgdir}/usr/share/${pkgname}"

  #
  #make -j1 DESTDIR="${pkgdir}" install
  #install -m 644 -D "${srcdir}/${pkg_name_dir}/SIDFactoryII/COPYING" "${pkgdir}/usr/share/licenses/${_pkgname}/COPYING"
  #

  # HACK: SF2 expects to find drivers etc in the same dir as the binary  :-S
  mkdir -p "${pkgdir}/opt/${_pkgname}"
  install -m 755 -D "${srcdir}/${pkg_name_dir}/artifacts/SIDFactoryII" "${pkgdir}/opt/${_pkgname}/SIDFactoryII"
  strip "${pkgdir}/opt/${_pkgname}/SIDFactoryII"

  mkdir -p "${pkgdir}/usr/bin"
  ln -sf "/opt/${_pkgname}/SIDFactoryII" "${pkgdir}/usr/bin/SIDFactoryII"
  ln -sf SIDFactoryII "${pkgdir}/usr/bin/sidfactory2"
  ln -sf SIDFactoryII "${pkgdir}/usr/bin/sf2"

  ln -s "/usr/share/${pkgname}/config" "${pkgdir}/opt/${_pkgname}/"
  ln -s "/usr/share/${pkgname}/drivers" "${pkgdir}/opt/${_pkgname}/"
  ln -s "/usr/share/${pkgname}/overlay" "${pkgdir}/opt/${_pkgname}/"
  ln -s "/usr/share/${pkgname}/color_schemes" "${pkgdir}/opt/${_pkgname}/"
  ln -s "/usr/share/${pkgname}/music" "${pkgdir}/opt/${_pkgname}/"

}

#
# EOF
#