2023-03-24 07:06:38 +00:00
|
|
|
#/usr/bin/env bash
|
|
|
|
|
2023-07-18 02:40:08 +00:00
|
|
|
pkgname="makedeb"
|
2023-08-02 14:18:56 +00:00
|
|
|
pkgver=0.0.2.0.g175943a
|
2023-03-24 07:06:38 +00:00
|
|
|
pkgrel=1
|
2023-08-02 14:18:56 +00:00
|
|
|
arch="all"
|
2023-03-28 08:03:03 +00:00
|
|
|
pkgcommit=""
|
2023-08-02 14:18:56 +00:00
|
|
|
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."
|
2023-07-18 02:40:08 +00:00
|
|
|
url="https://git.leafee98.com/leafee98/makedeb"
|
2023-03-24 07:06:38 +00:00
|
|
|
maintainer="Leafee98 <me@leafee98.com>"
|
|
|
|
|
|
|
|
source=(
|
2023-07-18 13:09:45 +00:00
|
|
|
"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
|
2023-07-18 02:40:08 +00:00
|
|
|
"README.md::README.md" # from local file
|
2023-03-24 07:06:38 +00:00
|
|
|
)
|
|
|
|
|
2023-07-18 02:40:08 +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 {
|
2023-07-18 02:40:08 +00:00
|
|
|
git describe --tags --long | sed 's/^v//;s/-/./g'
|
2023-03-24 07:06:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function build {
|
2023-07-18 02:40:08 +00:00
|
|
|
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 {
|
2023-07-18 02:40:08 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2023-07-18 02:40:08 +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
|
|
|
|
}
|