11 while getopts "do:s:u:" arg; do
27 echo "Unknown argument"
32 shift $(( ${OPTIND} - 1 ))
34 outname="$(echo ${outname} | tr '-' '_')"
40 # clibs should not have any dependencies or anything
52 _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)"
56 outname="${outname%%_lib32_dev}"
57 _descr="32-bit Libraries, Development Files"
61 outname="${outname%%_lib32_dbg}"
62 _descr="32-bit Libraries, Debugging Symbols"
66 outname="${outname%%_lib32}"
67 _descr="32-bit Libraries"
71 outname="${outname%%_dev}"
72 _descr="Development Files"
76 outname="${outname%%_dbg}"
77 _descr="Debugging Symbols"
81 outname="${outname%%_man}"
89 uclfile="${outname##*}${origname}"
90 outname="${outname##*}${origname}"
94 outname="${outname%%_*}"
96 pkgdeps="$(echo ${pkgdeps} | tr '_' '-')"
98 desc="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESC)"
99 comment="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_COMMENT)"
101 uclsource="${srctree}/release/packages/${outname}.ucl"
102 if [ ! -e "${uclsource}" ]; then
103 uclsource="${srctree}/release/packages/template.ucl"
106 if [ ! -z "${debug}" ]; then
108 echo "==============================================================="
110 echo "_descr=${_descr}"
111 echo "outname=${outname}"
112 echo "origname=${origname}"
113 echo "srctree=${srctree}"
114 echo "uclfile=${uclfile}"
116 echo "comment=${comment}"
117 echo "vital=${vital}"
118 echo "cp ${uclsource} -> ${uclfile}"
119 echo "==============================================================="
125 [ -z "${comment}" ] && comment="${outname} package"
126 [ ! -z "${_descr}" ] && comment="${comment} (${_descr})"
127 [ -z "${desc}" ] && desc="${outname} package"
129 cp "${uclsource}" "${uclfile}"
130 if [ ! -z "${pkgdeps}" ]; then
131 cat <<EOF >> ${uclfile}
133 FreeBSD-${pkgdeps}: {
135 version: "${PKG_VERSION}"
140 cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )"
141 sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
142 -e "s/%PKGNAME%/${origname}/" \
143 -e "s/%COMMENT%/${comment}/" \
144 -e "s/%DESC%/${desc}/" \
145 -e "s/%VITAL%/${vital}/" \
146 -e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \
147 -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \
148 -e "s|%PKG_WWW%|${PKG_WWW}|" \
149 -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \