summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/metadata.sh18
-rw-r--r--man/local.mk2
2 files changed, 19 insertions, 1 deletions
diff --git a/lib/metadata.sh b/lib/metadata.sh
index 30aa018..d635e8e 100644
--- a/lib/metadata.sh
+++ b/lib/metadata.sh
@@ -1,6 +1,6 @@
# Functions for parsing and validating package metadata
#
-# Copyright (C) 2012, 2014 Patrick McDermott
+# Copyright (C) 2012, 2014, 2018 Patrick McDermott
#
# This file is part of opkbuild.
#
@@ -29,6 +29,14 @@ _ob_metadata_do()
return ${?}
}
+## @brief Validate a source package name
+## @details \fBob_validate_source_name\fP validates a source package name
+## against the rules of the metadata plugin selected at libopkbuild's
+## build time.
+## @operand name req The source package name to validate.
+## @return Returns 0 if valid, 1 if invalid, or 125 if given an incorrect number
+## of arguments.
+## @pure yes This function has no side effects.
ob_validate_source_name()
{
local name=
@@ -44,6 +52,14 @@ ob_validate_source_name()
return ${?}
}
+## @brief Validate a binary package name
+## @details \fBob_validate_binary_name\fP validates a binary package name
+## against the rules of the metadata plugin selected at libopkbuild's
+## build time.
+## @operand name req The binary package name to validate.
+## @return Returns 0 if valid, 1 if invalid, or 125 if given an incorrect number
+## of arguments.
+## @pure yes This function has no side effects.
ob_validate_binary_name()
{
local name=
diff --git a/man/local.mk b/man/local.mk
index 2e0fcfe..abd17e2 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -41,6 +41,8 @@ man3_MANS = \
%reldir%/ob_set_substvar.3 \
%reldir%/ob_set_text_domain.3 \
%reldir%/ob_substvars.3 \
+ %reldir%/ob_validate_binary_name.3 \
+ %reldir%/ob_validate_source_name.3 \
%reldir%/ob_warn.3
SUFFIXES += .1in .1