11 while getopts "do:s:u:" arg; do
27 echo "Unknown argument"
32 shift $(( ${OPTIND} - 1 ))
39 # clibs should not have any dependencies or anything
50 _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)"
54 outname="${outname%%-lib32_dev}"
55 _descr="32-bit Libraries, Development Files"
59 outname="${outname%%-lib32_dbg}"
60 _descr="32-bit Libraries, Debugging Symbols"
64 outname="${outname%%-lib32}"
65 _descr="32-bit Libraries"
69 outname="${outname%%-dev}"
70 _descr="Development Files"
74 outname="${outname%%-dbg}"
75 _descr="Debugging Symbols"
79 outname="${outname%%-man}"
87 uclfile="${outname##*}${origname}"
88 outname="${outname##*}${origname}"
92 desc="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESC)"
93 comment="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_COMMENT)"
95 uclsource="${srctree}/release/packages/${outname}.ucl"
96 if [ ! -e "${uclsource}" ]; then
97 uclsource="${srctree}/release/packages/template.ucl"
100 if [ ! -z "${debug}" ]; then
102 echo "==============================================================="
104 echo "_descr=${_descr}"
105 echo "outname=${outname}"
106 echo "origname=${origname}"
107 echo "srctree=${srctree}"
108 echo "uclfile=${uclfile}"
110 echo "comment=${comment}"
111 echo "vital=${vital}"
112 echo "cp ${uclsource} -> ${uclfile}"
113 echo "==============================================================="
119 [ -z "${comment}" ] && comment="${outname} package"
120 [ ! -z "${_descr}" ] && comment="${comment} (${_descr})"
121 [ -z "${desc}" ] && desc="${outname} package"
123 cp "${uclsource}" "${uclfile}"
124 if [ ! -z "${pkgdeps}" ]; then
125 cat <<EOF >> ${uclfile}
127 FreeBSD-${pkgdeps}: {
129 version: "${PKG_VERSION}"
134 cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )"
135 sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
136 -e "s/%PKGNAME%/${origname}/" \
137 -e "s/%COMMENT%/${comment}/" \
138 -e "s/%DESC%/${desc}/" \
139 -e "s/%VITAL%/${vital}/" \
140 -e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \
141 -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \
142 -e "s|%PKG_WWW%|${PKG_WWW}|" \
143 -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \