summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7e8d287971b974b2f3dc75184855f5768adbfbaf (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
# Maintainer: Hunter Wittenborn <hunter@hunterwittenborn.com>
_release_type=alpha

pkgname=makedeb-makepkg-alpha
pkgver=8.10.2
pkgrel=1
pkgdesc="Arch Linux build utility, modified for use with makedeb (alpha release)"
arch=(any)
depends=('curl' 'fakeroot' 'libarchive-tools' 'coreutils' 'binutils' 'zstd' 'gettext-base')
conflicts=('makedeb-makepkg' 'makedeb-makepkg-beta')
replaces=('makepkg')
provides=('makepkg')
license=('GPL2')
url="https://github.com/makedeb/makepkg"

source=("${url}/archive/refs/tags/v${pkgver}-${_release_type}.tar.gz")
sha256sums=('SKIP')

prepare() {
  # Remove prebuild commands, and set package version.
  sed -i 's|.*# REMOVE AT PACKAGING||g' "makepkg-${pkgver}-${_release_type}/src/makepkg.sh"
  sed -i "s|makepkg_version='git'|makepkg_version='${pkgver}-${pkgrel}'|" "makepkg-${pkgver}-${_release_type}/src/makepkg.sh"

  # Set target OS
  sed -i 's|target_os="[^"]*"|target_os="debian"|' "makepkg-${pkgver}-${_release_type}/src/makepkg.sh"
}

package() {
	cd "makepkg-${pkgver}-${_release_type}"

	# Copy makepkg
	install -Dm 555 "src/makepkg.sh" "${pkgdir}/usr/bin/makedeb-makepkg"

	# Copy functions
	mkdir -p "${pkgdir}/usr/share/"
	cp -R "src/functions" "${pkgdir}/usr/share/makedeb-makepkg"
	chmod 555 "${pkgdir}/usr/share/makedeb-makepkg"

  # Copy config file
  install -Dm 444 "src/makepkg.conf" "${pkgdir}/etc/makepkg.conf"

  # Copy makepkg-template
  install -Dm 555 "src/makepkg-template" "${pkgdir}/usr/bin/makepkg-template"

  # Create pacman binary
  touch "${pkgdir}/usr/bin/pacman"
  chmod 555 "${pkgdir}/usr/bin/pacman"
}