summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 94fc4ac53416a6292adedb59e2784e141196f0f5 (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
# Maintainer: taotieren <admin@taotieren.com>

pkgname=netassistant
_pkgname=NetAssistant
pkgver=1.0.0
pkgrel=2
epoch=
pkgdesc="A network debugging assistant based on Qt GUI."
arch=($CARCH)
url="https://github.com/busyluo/NetAssistant"
license=('GPL-3.0-only')
groups=()
depends=(qt5-base)
makedepends=(
  qt5-tools
)
checkdepends=()
optdepends=()
provides=(${pkgname})
conflicts=(${pkgname})
replaces=()
backup=()
options=('!strip')
install=
changelog=
source=("${_pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
noextract=()
sha256sums=('75b2397809fbde45dc6594073e7dcd2e9b00ea73a558f40b8912ca02e54b3dc4')
#validpgpkeys=()

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}"
  qmake
  make
}

package() {
  install -Dm0755 "${srcdir}/${_pkgname}-${pkgver}/${_pkgname}" "${pkgdir}/usr/bin/${pkgname}"
  install -Dm0755 "${srcdir}/${_pkgname}-${pkgver}/${_pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
  install -Dm0644 "${srcdir}/${_pkgname}-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm0644 /dev/stdin "${pkgdir}/usr/share/metainfo/io.github.busyluo.netassistant.metainfo.xml" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
  <id>io.github.busyluo.netassistant</id>

  <name>${pkgname}</name>
  <summary>${pkgname}</summary>

  <metadata_license>MIT</metadata_license>
  <project_license>AGPL-3.0-only</project_license>

  <description>
    <p>
      A network debugging assistant based on Qt GUI.
    </p>
  </description>

  <launchable type="desktop-id">io.github.busyluo.netassistant.desktop</launchable>
</component>
EOF

  install -Dm0644 /dev/stdin "${pkgdir}/usr/share/applications/io.github.busyluo.netassistant.desktop" <<EOF
[Desktop Entry]
Version=1.0
Type=Application

Name=${pkgname}
Comment=NetAssistant
Categories=Network;Qt;

Icon=${pkgname}.png
Exec=${pkgname}
Terminal=false
EOF
}