11 while getopts "do:s:u:" arg; do
27 echo "Unknown argument"
32 shift $(( ${OPTIND} - 1 ))
34 outname="$(echo ${outname} | tr '-' '_')"
38 # clibs should not have any dependencies or anything
47 _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)"
50 outname="${outname%%_lib32_dev}"
51 _descr="32-bit Libraries, Development Files"
55 outname="${outname%%_lib32_dbg}"
56 _descr="32-bit Libraries, Debugging Symbols"
60 outname="${outname%%_lib32}"
61 _descr="32-bit Libraries"
65 outname="${outname%%_dev}"
66 _descr="Development Files"
70 outname="${outname%%_dbg}"
71 _descr="Debugging Symbols"
78 uclfile="${outname##*}${origname}"
79 outname="${outname##*}${origname}"
83 outname="${outname%%_*}"
85 pkgdeps="$(echo ${pkgdeps} | tr '_' '-')"
87 desc="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESC)"
88 comment="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_COMMENT)"
90 uclsource="${srctree}/release/packages/${outname}.ucl"
91 if [ ! -e "${uclsource}" ]; then
92 uclsource="${srctree}/release/packages/template.ucl"
95 if [ ! -z "${debug}" ]; then
97 echo "==============================================================="
99 echo "_descr=${_descr}"
100 echo "outname=${outname}"
101 echo "origname=${origname}"
102 echo "srctree=${srctree}"
103 echo "uclfile=${uclfile}"
105 echo "comment=${comment}"
106 echo "cp ${uclsource} -> ${uclfile}"
107 echo "==============================================================="
113 [ -z "${comment}" ] && comment="${outname} package"
114 [ ! -z "${_descr}" ] && comment="${comment} (${_descr})"
115 [ -z "${desc}" ] && desc="${outname} package"
117 cp "${uclsource}" "${uclfile}"
118 if [ ! -z "${pkgdeps}" ]; then
119 cat <<EOF >> ${uclfile}
121 FreeBSD-${pkgdeps}: {
123 version: "${PKG_VERSION}"
128 cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )"
129 sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
130 -e "s/%PKGNAME%/${origname}/" \
131 -e "s/%COMMENT%/${comment}/" \
132 -e "s/%DESC%/${desc}/" \
133 -e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \
134 -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \
135 -e "s|%PKG_WWW%|${PKG_WWW}|" \
136 -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \