11 while getopts "do:s:u:" arg; do
27 echo "Unknown argument"
32 shift $(( ${OPTIND} - 1 ))
42 # clibs should not have any dependencies or anything
49 # -dev packages that have no corresponding non-dev package
52 outname=${outname%%-dev}
53 _descr="Development Files"
56 outname=${outname%%-lib32_dev}
57 _descr="32-bit Libraries, Development Files"
65 _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)"
69 outname="${outname%%-lib32_dev}"
70 _descr="32-bit Libraries, Development Files"
74 outname="${outname%%-lib32_dbg}"
75 _descr="32-bit Libraries, Debugging Symbols"
79 outname="${outname%%-lib32}"
80 _descr="32-bit Libraries"
84 outname="${outname%%-dev}"
85 _descr="Development Files"
89 outname="${outname%%-dbg}"
90 _descr="Debugging Symbols"
94 outname="${outname%%-man}"
102 uclfile="${outname##*}${origname}"
103 outname="${outname##*}${origname}"
107 desc="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESC)"
108 comment="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_COMMENT)"
110 uclsource="${srctree}/release/packages/${outname}.ucl"
111 if [ ! -e "${uclsource}" ]; then
112 uclsource="${srctree}/release/packages/template.ucl"
115 if [ ! -z "${debug}" ]; then
117 echo "==============================================================="
119 echo "_descr=${_descr}"
120 echo "outname=${outname}"
121 echo "origname=${origname}"
122 echo "srctree=${srctree}"
123 echo "uclfile=${uclfile}"
125 echo "comment=${comment}"
126 echo "vital=${vital}"
127 echo "cp ${uclsource} -> ${uclfile}"
128 echo "==============================================================="
134 [ -z "${comment}" ] && comment="${outname} package"
135 [ ! -z "${_descr}" ] && comment="${comment} (${_descr})"
136 [ -z "${desc}" ] && desc="${outname} package"
138 cp "${uclsource}" "${uclfile}"
139 if [ ! -z "${pkgdeps}" ]; then
140 cat <<EOF >> ${uclfile}
142 FreeBSD-${pkgdeps}: {
144 version: "${PKG_VERSION}"
149 cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )"
150 sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \
151 -e "s/%PKGNAME%/${origname}/" \
152 -e "s/%COMMENT%/${comment}/" \
153 -e "s/%DESC%/${desc}/" \
154 -e "s/%VITAL%/${vital}/" \
155 -e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \
156 -e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \
157 -e "s|%PKG_WWW%|${PKG_WWW}|" \
158 -e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \