summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 464786ec238714fd97be2afacc092a56251a58ee (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
# Maintainer:Saeed  Badrelden <helwanlinux@gmail.com>
pkgname=hel-web-server
pkgver=1.0.1
pkgrel=1
pkgdesc="A simple web server utility for Helwan Linux, supporting various server types like Django and Flask."
arch=('any')
url="https://github.com/helwan-linux/helwan-server"
license=('GPL')
depends=('python' 'python-pyqt5' 'python-setuptools' 'desktop-file-utils')

source=("${pkgname}-${pkgver}.tar.gz::https://github.com/helwan-linux/helwan-server/archive/refs/heads/main.tar.gz")
sha256sums=('SKIP')

build() {
  cd "${srcdir}/helwan-server-main"
}

package() {
  cd "${srcdir}/helwan-server-main"

  install -d "${pkgdir}/usr/bin/"
  install -d "${pkgdir}/usr/share/${pkgname}/"
  install -d "${pkgdir}/usr/share/applications/"
  install -d "${pkgdir}/usr/share/icons/hicolor/128x128/apps/"

  # نسخ ملفات المشروع
  cp -r hel-web-server/* "${pkgdir}/usr/share/${pkgname}/"

  # سكربت التشغيل
  cat << EOF > "${pkgdir}/usr/bin/${pkgname}"
#!/bin/bash
python /usr/share/${pkgname}/hel_web_server.py "\$@"
EOF
  chmod +x "${pkgdir}/usr/bin/${pkgname}"

  # أيقونة
  install -m644 hel-web-server/gui/resources/icon.png \
    "${pkgdir}/usr/share/icons/hicolor/128x128/apps/${pkgname}.png"

  # ملف .desktop
  cat << EOF > "${pkgdir}/usr/share/applications/${pkgname}.desktop"
[Desktop Entry]
Name=Hel-Web-Server
Comment=A local web server for development and project hosting.
Exec=/usr/bin/${pkgname}
Icon=${pkgname}
Terminal=false
Type=Application
Categories=Development;Network;WebDevelopment;
StartupNotify=true
Keywords=web;server;http;development;hosting;linux;helwan;
EOF

  # تحديث كاش الأيقونات
  gtk-update-icon-cache -q /usr/share/icons/hicolor || true
}