diff options
author | P. J. McDermott <pjm@nac.net> | 2012-01-21 12:15:05 (EST) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-01-21 12:15:05 (EST) |
commit | f5094a6b99ab893c97a69cb7e9e6a9d9dc0728b5 (patch) | |
tree | fa3e3f61fb4b32aa85061a7e1ffeae3de88d0c33 /src | |
parent | d13e7b92e1dbfe412f0ef42e6e915a4feacdf174 (diff) |
Use control fields library.
Diffstat (limited to 'src')
-rw-r--r-- | src/oh-buildopk | 4 | ||||
-rw-r--r-- | src/opkbuild | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/oh-buildopk b/src/oh-buildopk index bcea2c0..03ae59d 100644 --- a/src/oh-buildopk +++ b/src/oh-buildopk @@ -19,6 +19,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +. @@LIBDIR@@/opkhelper/controlfields + print_usage() { printf 'Usage: %s pkgname...\n' "$1" @@ -43,7 +45,7 @@ while [ ${#} -gt 0 ]; do tar -czf ../control.tar.gz . cd .. # Pack opk file. - tar -czf ../../${1}_pkgver-pkgrev_arch.opk \ + tar -czf ../../${1}_$(oh_get_field ${1} Version)_arch.opk \ debian-binary data.tar.gz control.tar.gz rm -Rf debian-binary control data.tar.gz control.tar.gz shift diff --git a/src/opkbuild b/src/opkbuild index 5d73092..f863ee9 100644 --- a/src/opkbuild +++ b/src/opkbuild @@ -19,6 +19,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +. @@LIBDIR@@/opkhelper/controlfields + print_usage() { printf 'Usage: %s\n' "$1" @@ -35,19 +37,21 @@ if [ "$(cat format)" != '1.0' ]; then fi # Build *-src package. -mkdir -p tmp/${pkgname}/usr/src/${pkgname}_${pkgver} +srcpkg=$(oh_get_field Source) +version=$(oh_get_field Version) +mkdir -p tmp/${srcpkg}-src/usr/src/${srcpkg}_${version} cd tmp for file in ../*; do case ${file} in ../tmp) ;; ../*) - cp -R ${file} ${pkgname}-src/usr/src/${pkgname}_${pkgver} + cp -R ${file} ${srcpkg}-src/usr/src/${srcpkg}_${version} ;; esac done oh-gencontrol -s -oh-buildopk ${pkgname}-src +oh-buildopk ${srcpkg}-src rm -Rf dest # Build other binary packages. |