makedeb/DEBBUILD

61 lines
1.8 KiB
Plaintext
Raw Permalink Normal View History

2023-03-24 07:06:38 +00:00
#/usr/bin/env bash
pkgname="makedeb"
pkgver=0.0.2.0.g175943a
2023-03-24 07:06:38 +00:00
pkgrel=1
arch="all"
pkgcommit=""
section="utils" # https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections
priority="optional" # https://www.debian.org/doc/debian-policy/ch-archive.html#s-priorities
2023-03-24 07:06:38 +00:00
pkgdesc="A painless selfhost git service."
url="https://git.leafee98.com/leafee98/makedeb"
2023-03-24 07:06:38 +00:00
maintainer="Leafee98 <me@leafee98.com>"
source=(
"LICENSE::https://git.leafee98.com/leafee98/makedeb/raw/branch/main/LICENSE" # from http (existed file will skip, without checking hash)
"makedeb-repo::git+https://git.leafee98.com/leafee98/makedeb.git#branch=main" # from git with https
"README.md::README.md" # from local file
2023-03-24 07:06:38 +00:00
)
# This will be run just after extracting source, and re-assign to `pkgver`
#
# If extracting version from source is not needed, don't define this function.
2023-03-24 07:06:38 +00:00
function pkgver {
git describe --tags --long | sed 's/^v//;s/-/./g'
2023-03-24 07:06:38 +00:00
}
function build {
echo "Here should do something like compile sources."
echo "But for this package we just print some messages."
2023-03-24 07:06:38 +00:00
}
function package {
install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/makedeb/LICENSE"
install -Dm755 "${srcdir}/makedeb-repo/makedeb" "${pkgdir}/usr/bin/makedeb"
install -Dm755 "${srcdir}/README.md" "${pkgdir}/usr/share/doc/makedeb/README.md"
2023-03-24 07:06:38 +00:00
}
# The function describing hook for (pre|post)(inst|rm) should
# *print* content of those hook file.
# If the any hook is not needed, don't define those function.
#function debian_preinst {
#}
function debian_postinst {
cat << EOF
#!/usr/bin/env bash
echo "successfully installed makedeb"
EOF
}
#function debian_prerm {
#}
function debian_postrm {
cat << EOF
#!/usr/bin/env bash
echo "successfully removed makedeb"
EOF
}