Directory name will now be used as the package name if not set in bpm-setup and updated README.md

This commit is contained in:
EnumDev 2024-10-08 10:32:58 +03:00
parent 9372acba3f
commit 66c8dd5f91
2 changed files with 9 additions and 4 deletions

View File

@ -21,7 +21,7 @@ Creating a package for BPM with these utilities is simple
2) Run the following command (You can run the comamnd with no arguments to see available options) 2) Run the following command (You can run the comamnd with no arguments to see available options)
``` ```
bpm-setup -D my_bpm_package -t <binary/source> bpm-setup -D my_package -t <binary/source>
``` ```
3) This will create a directory named 'my_bpm_package' under the current directory with all the required files for the chosen package type 3) This will create a directory named 'my_bpm_package' under the current directory with all the required files for the chosen package type
4) You are able to edit the pkg.info descriptor file inside the newly created directory to your liking. Here's an example of what a descriptor file could look like 4) You are able to edit the pkg.info descriptor file inside the newly created directory to your liking. Here's an example of what a descriptor file could look like
@ -29,12 +29,14 @@ bpm-setup -D my_bpm_package -t <binary/source>
name: my_package name: my_package
description: My package's description description: My package's description
version: 1.0 version: 1.0
revision: 2 (Optional)
architecture: x86_64 architecture: x86_64
url: https://www.my-website.com/ (Optional) url: https://www.my-website.com/ (Optional)
license: MyLicense (Optional) license: MyLicense (Optional)
type: <binary/source> type: <binary/source>
depends: dependency1,dependency2 (Optional) depends: ["dependency1","dependency2"] (Optional)
make_depends: make_depend1,make_depend2 (Optional) optional_depends: ["optional_depend1","optional_depend2"]
make_depends: ["make_depend1","make_depend2"] (Optional)
``` ```
### Binary Packages ### Binary Packages
3) If you are making a binary package, copy all your binaries along with the directories they reside in (i.e files/usr/bin/my_binary) 3) If you are making a binary package, copy all your binaries along with the directories they reside in (i.e files/usr/bin/my_binary)

View File

@ -19,7 +19,6 @@ if [ $# -eq 0 ]; then
exit exit
fi fi
NAME="package-name"
DESCRIPTION="Default package description" DESCRIPTION="Default package description"
VERSION="1.0" VERSION="1.0"
#URL="https://my.project.url/ (Optional)" #URL="https://my.project.url/ (Optional)"
@ -79,6 +78,10 @@ if [ -z "${DIRECTORY}" ]; then
exit 1 exit 1
fi fi
if [ -z "${NAME}" ]; then
NAME="${DIRECTORY}"
fi
if [[ ! "${DIRECTORY}" == "/"* ]]; then if [[ ! "${DIRECTORY}" == "/"* ]]; then
DIRECTORY="${PWD}/${DIRECTORY}" DIRECTORY="${PWD}/${DIRECTORY}"
fi fi