Skip to content

Commit

Permalink
packaging: clean up
Browse files Browse the repository at this point in the history
o INSTALLDIR had an extraneous '/' at the end.  remove.
  (functions-build.sh)

o remove extraneous 'cd ${BUILD_ROOT}'s from build.sh.  fixed
  installto so no longer needed.
  • Loading branch information
cire831 committed Jul 7, 2014
1 parent 93f83c7 commit 69c5dad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packaging/functions-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fi
#$2: package version
#$3: package release
setup_package_target(){
INSTALLDIR=${BUILD_ROOT}/${1}_${2}-${3}/
INSTALLDIR=${BUILD_ROOT}/${1}_${2}-${3}
if [[ -z "${PACKAGES_DIR}" ]]; then
PACKAGES_DIR=${BUILD_ROOT}/packages
fi
Expand Down
26 changes: 7 additions & 19 deletions packaging/tinyos-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CODENAME=squeeze

SOURCENAME=tinyos-tools
SOURCEVERSION=1.4.3
SOURCEDIRNAME=${SOURCENAME}-${SOURCEVERSION}
SOURCEDIRNAME=${SOURCENAME}_${SOURCEVERSION}
#PACKAGE_RELEASE=1
PREFIX=/usr
MAKE="make -j8"
Expand All @@ -53,8 +53,11 @@ build()

installto()
{
cd ${SOURCEDIRNAME}/tools
${MAKE} DESTDIR=${INSTALLDIR} install
set -e
(
cd ${SOURCEDIRNAME}/tools
${MAKE} DESTDIR=${INSTALLDIR} install
)
}

package_deb(){
Expand All @@ -81,7 +84,6 @@ cleaninstall(){
case $1 in
test)
installto
# cd ${BUILD_ROOT}
# package_deb
;;

Expand All @@ -96,21 +98,16 @@ case $1 in

veryclean)
cleanbuild
cd ${BUILD_ROOT}
cleandownloaded
;;

deb)
# sets up INSTALLDIR, which package_deb uses
setup_package_target ${SOURCENAME} ${SOURCEVERSION} ${PACKAGE_RELEASE}
cd ${BUILD_ROOT}
download
cd ${BUILD_ROOT}
build
cd ${BUILD_ROOT}
installto
cd ${BUILD_ROOT}
package_deb
cd ${BUILD_ROOT}
cleaninstall
;;

Expand All @@ -125,15 +122,10 @@ case $1 in

rpm)
setup_package_target ${SOURCENAME} ${SOURCEVERSION} ${PACKAGE_RELEASE}
cd ${BUILD_ROOT}
download
cd ${BUILD_ROOT}
build
cd ${BUILD_ROOT}
installto
cd ${BUILD_ROOT}
package_rpm
cd ${BUILD_ROOT}
cleaninstall
;;

Expand All @@ -149,16 +141,12 @@ case $1 in

local)
setup_local_target
cd ${BUILD_ROOT}
download
cd ${BUILD_ROOT}
build
cd ${BUILD_ROOT}
installto
;;

tarball)
cd ${BUILD_ROOT}
download
tar -cjf ${SOURCEDIRNAME}.tar.bz2 ${SOURCEDIRNAME}
;;
Expand Down

0 comments on commit 69c5dad

Please sign in to comment.