Creating a tiny new GhostBSD / FreeBSD package for sharing with others, GURUs Generate_User_Report_for_Upload
Here is an example of creating a FreeBSD style package, read some URLs
http://lastsummer.de/creating-custom-packages-on-freebsd/#:~:text=The%20last%20step%20uses%20pkg-create%288%29%20to%20build%20a,to%20use%20the%20package%20archive%20file%20with%20pkg-add%288%29. This has very good steps to follow,
Insert this file to start your journey. Copy and paste into tmp_stage.sh ; chmod u+x tmp_stage.sh ; sh ./tmp_stage.sh
#!/bin/sh
STAGEDIR=/tmp/stage
rm -rf ${STAGEDIR}
mkdir -p ${STAGEDIR}
cat >> ${STAGEDIR}/+PRE_DEINSTALL <<EOF
# careful here, this may clobber your system
echo "Resetting root shell"
pw usermod -n root -s /bin/csh
EOF
cat >> ${STAGEDIR}/+POST_INSTALL <<EOF
# careful here, this may clobber your system
echo "Registering root shell"
pw usermod -n root -s /bin/sh
EOF
https://github.com/freebsd/pkg Github has some good reading too.
https://stackoverflow.com/questions/4602977/freebsd-pkg-create-how-to Kind of Sparse as an example. May be of future use
https://www.tecmint.com/pkg-command-examples-to-manage-packages-in-freebsd/ 23 examples of using pkg command
https://forums.freebsd.org/threads/where-does-make-package-put-the-pkg-file.73535/ Helpful example of creating a package "pkg help create"
https://forums.freebsd.org/threads/creating-a-pkg-with-pkg-create.88358/ FreeBSD forum post that I followed and put a link to this blog.
https://docs.freebsd.org/en/books/porters-handbook/plist/#plist-keywords Yes the learning curve is too damned steep to accomplish a very simple task of creating a binary package from these 7 files:
No creation of these files from a Makefile is needed. I included a sample Makefile.
Freebsd pkg #manifest
Best simple use of "pkg create" tool Best description on the web
Packaging setup, usage, and explanation
How to make a binary package, using FreeBSD tools
Quick Porting example from Porters Handbook
https://forums.freebsd.org/threads/creating-a-pkg-with-pkg-create.88358/#post-602161 Pat Maddox March 2023 help with pkg creation
Section 3.2..2 porting pkg plist
./share/applications/generate_user_report.desktop #Desktop application file
./lib/guru/Makefile #Makefile
./lib/guru/README.md #Standard Readme file written in MarkDown language
./lib/guru/Report_fred-ghostbsd-pc1_2020-04-05_example.txt #Example Report.txt File created from User_Report.sh file
./lib/guru/User_Report.py #Python script file to create the GUI interface with a couple buttons
./lib/guru/User_Report.sh #Shell Script file
./lib/guru/applets-screenshooter.png #Icon file
No creation of these files from a Makefile is needed. I included a sample Makefile.
Freebsd pkg #manifest
Best simple use of "pkg create" tool Best description on the web
Packaging setup, usage, and explanation
How to make a binary package, using FreeBSD tools
Quick Porting example from Porters Handbook
https://forums.freebsd.org/threads/creating-a-pkg-with-pkg-create.88358/#post-602161 Pat Maddox March 2023 help with pkg creation
Section 3.2..2 porting pkg plist