Add documentation creation and checksums
This commit is contained in:
parent
0b576e43a2
commit
c7325f5be1
10
Makefile
10
Makefile
|
@ -6,6 +6,7 @@ help:
|
||||||
@echo "make install Install ${NAME}."
|
@echo "make install Install ${NAME}."
|
||||||
@echo "make uninstall Uninstall ${NAME}."
|
@echo "make uninstall Uninstall ${NAME}."
|
||||||
@echo "make clean: Remove tarballs."
|
@echo "make clean: Remove tarballs."
|
||||||
|
@echo "make docs Create documentation for ${NAME}."
|
||||||
@echo "make dist Create distro package for ${NAME}."
|
@echo "make dist Create distro package for ${NAME}."
|
||||||
@echo "make pkg_arch Create Arch package ${NAME}."
|
@echo "make pkg_arch Create Arch package ${NAME}."
|
||||||
|
|
||||||
|
@ -20,13 +21,20 @@ uninstall:
|
||||||
clean:
|
clean:
|
||||||
rm -f *.tar* *zst* *${NAME}-${VER}.PKGBUILD
|
rm -f *.tar* *zst* *${NAME}-${VER}.PKGBUILD
|
||||||
|
|
||||||
dist: clean
|
docs: clean
|
||||||
|
printf "%% ${NAME}(1) ${VER} | ${DESC}\n" > .man.md
|
||||||
|
pandoc --standalone --to man .man.md -o ${NAME}.1
|
||||||
|
rm -f .man.md
|
||||||
|
|
||||||
|
dist: docs
|
||||||
mkdir -p ${NAME}-${VER}
|
mkdir -p ${NAME}-${VER}
|
||||||
cp ${NAME} README.md LICENSE Makefile *.mk ${NAME}-${VER}
|
cp ${NAME} README.md LICENSE Makefile *.mk ${NAME}-${VER}
|
||||||
[ -f "PKGBUILD" ] && cp -f PKGBUILD ${NAME}-${VER} || :
|
[ -f "PKGBUILD" ] && cp -f PKGBUILD ${NAME}-${VER} || :
|
||||||
tar -cf ${NAME}-${VER}.tar ${NAME}-${VER}
|
tar -cf ${NAME}-${VER}.tar ${NAME}-${VER}
|
||||||
gzip ${NAME}-${VER}.tar
|
gzip ${NAME}-${VER}.tar
|
||||||
rm -rf ${NAME}-${VER}.tar ${NAME}-${VER}
|
rm -rf ${NAME}-${VER}.tar ${NAME}-${VER}
|
||||||
|
md5sum ${NAME}-${VER}.tar.gz | cut -d ' ' -f 1 > ${NAME}-${VER}.tar.gz.md5
|
||||||
|
sha256sum ${NAME}-${VER}.tar.gz | cut -d ' ' -f 1 > ${NAME}-${VER}.tar.gz.sha256
|
||||||
gpg --detach-sign --yes --local-user $$(whoami) ${NAME}-${VER}.tar.gz || :
|
gpg --detach-sign --yes --local-user $$(whoami) ${NAME}-${VER}.tar.gz || :
|
||||||
|
|
||||||
pkg_arch: dist
|
pkg_arch: dist
|
||||||
|
|
16
README.md
16
README.md
|
@ -1,3 +1,17 @@
|
||||||
# shell-makefile-template
|
# shell-makefile-template
|
||||||
|
|
||||||
Shell script Makefile template with Arch PKGBUILD creation.
|
Shell script Makefile template with Arch PKGBUILD creation.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
This makefile does the following:
|
||||||
|
|
||||||
|
- Handles installation of the script
|
||||||
|
- Handles man pages using pandoc
|
||||||
|
- Handles distro packages (tarballs)
|
||||||
|
- Automatically prepares a PKGBUILD which can create an Arch Linux
|
||||||
|
package for your script
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Edit `options.mk` to fit your program.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# my-awesome-program
|
# my-awesome-program
|
||||||
|
|
||||||
printf "%s:The makefile works perfectly.\n" "$0"
|
printf "%s: The makefile works perfectly.\n" "$0"
|
||||||
|
|
18
my-awesome-program.1
Normal file
18
my-awesome-program.1
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
.\" Automatically generated by Pandoc 3.1.2
|
||||||
|
.\"
|
||||||
|
.\" Define V font for inline verbatim, using C font in formats
|
||||||
|
.\" that render this, and otherwise B font.
|
||||||
|
.ie "\f[CB]x\f[]"x" \{\
|
||||||
|
. ftr V B
|
||||||
|
. ftr VI BI
|
||||||
|
. ftr VB B
|
||||||
|
. ftr VBI BI
|
||||||
|
.\}
|
||||||
|
.el \{\
|
||||||
|
. ftr V CR
|
||||||
|
. ftr VI CI
|
||||||
|
. ftr VB CB
|
||||||
|
. ftr VBI CBI
|
||||||
|
.\}
|
||||||
|
.TH "my-awesome-program" "1" "" "0.1" "My awesome description here"
|
||||||
|
.hy
|
13
my-awesome-program.md
Normal file
13
my-awesome-program.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# my-awesome-program
|
||||||
|
|
||||||
|
This is the man page for my awesome program
|
||||||
|
|
||||||
|
## Arguments
|
||||||
|
|
||||||
|
`-h`
|
||||||
|
: Help
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
my-awesome-program is licensed under the GNU GPLv3 license.
|
||||||
|
The documentation is licensed under the CC-BY-SA 4.0 license.
|
Loading…
Reference in a new issue