add i3 pkg

This commit is contained in:
komeil Parseh 2023-03-16 16:39:25 +03:30
parent 3ce82a7ea9
commit c04869fd96
No known key found for this signature in database
GPG key ID: 1928AF673B1C4255
3 changed files with 65 additions and 0 deletions

21
.PKGBUILD.template Normal file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
pkgname={pkg_name}
pkgver={pkg_ver}
pkgrel=1
pkgdesc={pkg_desc}
arch=("any")
url="https://parchlinux.ir/"
license=("GPL")
conflict=("${pkgname%}")
deps=({pkg_deps})
package() {
install -d "${pkgdir}/etc/skel/.config"
install -d "${pkgdir}/etc/skel/.local"
# install -dm755 "${srcdir}/etc/skel/.config/*" "${pkgdir}/etc/skel/.config"
# install -dm755 "${srcdir}/etc/skel/.local/*" "${pkgdir}/etc/skel/.local"
cp -rv ${srcdir}/etc/skel/.config/* ${pkgdir}/etc/skel/.config/
cp -rv ${srcdir}/etc/skel/.local/* ${pkgdir}/etc/skel/.local/
}

25
create_pkg Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
# set -x
read -p "Please enter pkg name:" pkg_name
read -p "Please enter version:" pkg_ver
read -ep "Please enter description:" pkg_desc
read -ep "Please enter dependences: " pkg_deps
pkg_verbose="$1"
if ! [[ $pkg_verbose -eq "-v" || $pkg_verbose -eq "--verbose" ]]; then
pkg_verbose=""
fi
mkdir -p $pkg_name $pkg_verbose
pkg_file="${pkg_name}/PKGBUILD"
cp .PKGBUILD.template $pkg_file $pkg_verbose
sed -i -e "s/{pkg_name}/${pkg_name}/g" $pkg_file
sed -i -e "s/{pkg_ver}/${pkg_ver}/g" $pkg_file
sed -i -e "s/{pkg_desc}/${pkg_desc}/g" $pkg_file
sed -i -e "s/{pkg_deps}/${pkg_deps}/g" $pkg_file

19
parch-config-i3/PKGBUILD Normal file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env bash
pkgname=parch-config-i3
pkgver=1.0.0
pkgrel=1
pkgdesc="parch linux i3 config"
arch=("any")
url="https://parchlinux.ir/"
license=("GPL")
conflict=("${pkgname%}")
deps=("i3" "kitty" "rofi" "dmenu" "feb" "nitrogen" "picom" "xsel" "noto-fonts" "polybar" "flameshot" "volumeicon" "ttf-icomoon-feather")
package() {
install -d "${pkgdir}/etc/skel/.config"
install -d "${pkgdir}/etc/skel/.local"
cp -rv ${srcdir}/etc/skel/.config/* ${pkgdir}/etc/skel/.config/
cp -rv ${srcdir}/etc/skel/.local/* ${pkgdir}/etc/skel/.local/
}