| 1 |
#!/bin/sh |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
progname="$0" |
|---|
| 44 |
|
|---|
| 45 |
srcdir="`pwd`/.." |
|---|
| 46 |
builddir=${srcdir} |
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 |
prefix=/usr/local |
|---|
| 50 |
appsdir=/Applications |
|---|
| 51 |
emapp=Emacs.app |
|---|
| 52 |
with_config=yes |
|---|
| 53 |
with_app=yes |
|---|
| 54 |
with_x=no |
|---|
| 55 |
comp_diskimage=no |
|---|
| 56 |
self_contained=no |
|---|
| 57 |
app_symlink=no |
|---|
| 58 |
full_dist=yes |
|---|
| 59 |
compressed_dist=no |
|---|
| 60 |
build_in_place=no |
|---|
| 61 |
keep_directory=no |
|---|
| 62 |
|
|---|
| 63 |
ac_prev= |
|---|
| 64 |
display_usage=false; |
|---|
| 65 |
config_options=; |
|---|
| 66 |
while test $ |
|---|
| 67 |
do |
|---|
| 68 |
if test -n "$ac_prev"; then |
|---|
| 69 |
eval "$ac_prev=\$1" |
|---|
| 70 |
ac_prev= |
|---|
| 71 |
continue |
|---|
| 72 |
fi |
|---|
| 73 |
case $1 in |
|---|
| 74 |
-help | --help | --hel | --he | -h) |
|---|
| 75 |
display_usage=yes ;; |
|---|
| 76 |
-p | -prefix | --p | --prefix) |
|---|
| 77 |
ac_prev=prefix ;; |
|---|
| 78 |
-p=* | -prefix=* | --p=* | --prefix=*) |
|---|
| 79 |
prefix=`expr "x$1" : 'x[^=]*=\(.*\)'` ;; |
|---|
| 80 |
--build-in-place | --build-in-place ) |
|---|
| 81 |
build_in_place=yes ;; |
|---|
| 82 |
--build-dir | -build-dir | --builddir | -build-dir) |
|---|
| 83 |
build_in_place=no |
|---|
| 84 |
ac_prev=builddir;; |
|---|
| 85 |
--build-dir=* | -build-dir=* | -builddir=* | --builddir=*) |
|---|
| 86 |
build_in_place=no |
|---|
| 87 |
builddir=`expr "x$1" : 'x[^=]*=\(.*\)'`;; |
|---|
| 88 |
-no-configure | -no-conf | --no-configure | --no-conf | --without-config) |
|---|
| 89 |
with_config=no ;; |
|---|
| 90 |
-no-app | --no-app | -without-app | --without-app) |
|---|
| 91 |
with_app=no ;; |
|---|
| 92 |
-without-x | --without-x) |
|---|
| 93 |
with_x=no ;; |
|---|
| 94 |
-with-x | --with-x) |
|---|
| 95 |
with_x=yes |
|---|
| 96 |
with_app=no ;; |
|---|
| 97 |
--without-full-dist | -without-full-dist | -no-full-dist | -no-full) |
|---|
| 98 |
full_dist=no ;; |
|---|
| 99 |
--compressed-dist) |
|---|
| 100 |
compressed_dist=yes ;; |
|---|
| 101 |
--self-contained | -self-contained | --with-self-contained-app | -sc) |
|---|
| 102 |
self_contained=yes ;; |
|---|
| 103 |
-app-symlink | --app-symlink | -symlink | --symlink | --asl) |
|---|
| 104 |
app_symlink=yes ;; |
|---|
| 105 |
--keep-dir) |
|---|
| 106 |
keep_directory=yes ;; |
|---|
| 107 |
-C,* | -c,*) |
|---|
| 108 |
config_options="$config_options `expr "x$1" : 'x[^,]*,\(.*\)'`" ;; |
|---|
| 109 |
-M,* | -m,*) |
|---|
| 110 |
make_options="$make_options `expr "x$1" : 'x[^,]*,\(.*\)'`" ;; |
|---|
| 111 |
*) |
|---|
| 112 |
display_usage=yes ;; |
|---|
| 113 |
esac |
|---|
| 114 |
shift |
|---|
| 115 |
done |
|---|
| 116 |
|
|---|
| 117 |
if test "$with_x" = "no"; then |
|---|
| 118 |
config_options="--without-x $config_options" |
|---|
| 119 |
fi |
|---|
| 120 |
|
|---|
| 121 |
if test "$display_usage" = "yes"; then |
|---|
| 122 |
cat <<EOF |
|---|
| 123 |
\`make-package' generates a Mac OS X installer package from an Emacs |
|---|
| 124 |
distribution. By default, this first runs ./configure on the emacs |
|---|
| 125 |
directory. Then make install to create the emacs distribution. |
|---|
| 126 |
Then some mac-specific commands to generate the required information |
|---|
| 127 |
for the mac package. The installer will, by default, create a |
|---|
| 128 |
Carbon application called Emacs in the ${appsdir} directory, with the |
|---|
| 129 |
shared emacs files in /usr/local |
|---|
| 130 |
|
|---|
| 131 |
Usage: $0 [OPTION] |
|---|
| 132 |
|
|---|
| 133 |
Options: |
|---|
| 134 |
-h, --help display this help and exit |
|---|
| 135 |
--prefix=DIR Set install location for the Mac OS X package |
|---|
| 136 |
of the emacs related file. By default /usr/local |
|---|
| 137 |
--no-conf Do not run the configure script before running |
|---|
| 138 |
make install. |
|---|
| 139 |
--without-app Do not create the Emacs application bundle |
|---|
| 140 |
--with-x Setup the install to use X Windows for its |
|---|
| 141 |
windowed display, instead of carbon. Implies |
|---|
| 142 |
--without-app. |
|---|
| 143 |
--without-full-dist Do not include all the .el files in the distribution. |
|---|
| 144 |
This is discouraged except if disk space is critical. |
|---|
| 145 |
--compressed-dist Compress .el and info files in the distribution. |
|---|
| 146 |
--app-symlink Have the Emacs.app executable be a symlink |
|---|
| 147 |
to the install in [prefix]/bin/emacs and have |
|---|
| 148 |
the emacs executable link to emacs-${version} |
|---|
| 149 |
--self-contained Create an Emacs.app that is self-contained; |
|---|
| 150 |
prefix will be ignored and all files installed |
|---|
| 151 |
inside the application |
|---|
| 152 |
--build-in-place Build the application in the source directory |
|---|
| 153 |
instead of a temporary directory. |
|---|
| 154 |
--build-dir=DIR Build the application in the specified directory |
|---|
| 155 |
instead of a temporary directory. Mutually exclusive |
|---|
| 156 |
with --build-in-place. |
|---|
| 157 |
-C,option Pass option to configure |
|---|
| 158 |
-M,option Pass option to make |
|---|
| 159 |
EOF |
|---|
| 160 |
exit 0 |
|---|
| 161 |
fi |
|---|
| 162 |
|
|---|
| 163 |
|
|---|
| 164 |
|
|---|
| 165 |
|
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 |
LANGUAGE=C |
|---|
| 170 |
LC_ALL=C |
|---|
| 171 |
LC_MESSAGES= |
|---|
| 172 |
LANG= |
|---|
| 173 |
export LANGUAGE LC_ALL LC_MESSAGES LANG |
|---|
| 174 |
|
|---|
| 175 |
|
|---|
| 176 |
umask 0 |
|---|
| 177 |
|
|---|
| 178 |
|
|---|
| 179 |
if [ -f Emacs.pkg ]; then |
|---|
| 180 |
echo "${progname}: Package Emacs.pkg already exists. |
|---|
| 181 |
Perhaps a previous invocation of \`${progname}' failed to clean up after |
|---|
| 182 |
itself. Move or delete Emacs.pkg and try again." >&2 |
|---|
| 183 |
exit 1 |
|---|
| 184 |
fi |
|---|
| 185 |
|
|---|
| 186 |
if test $with_app == "yes" && [ ! -f ${emapp}/Contents/PkgInfo ]; then |
|---|
| 187 |
echo "${progname}: Can't find \`${emapp}/Contents/PkgInfo'" >&2 |
|---|
| 188 |
echo "${progname} must be run in the \`mac' directory of the Emacs" >&2 |
|---|
| 189 |
echo "distribution tree. cd to that directory and try again." >&2 |
|---|
| 190 |
exit 1 |
|---|
| 191 |
fi |
|---|
| 192 |
|
|---|
| 193 |
|
|---|
| 194 |
if [ ! -f ../lisp/version.el ]; then |
|---|
| 195 |
echo "${progname}: Can't find \`../lisp/version.el'" >&2 |
|---|
| 196 |
exit 1 |
|---|
| 197 |
fi |
|---|
| 198 |
|
|---|
| 199 |
|
|---|
| 200 |
shortversion=`grep 'defconst[ ]*emacs-version' ../lisp/version.el \ |
|---|
| 201 |
| sed -e 's/^.*"\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` |
|---|
| 202 |
version=`grep 'defconst[ ]*emacs-version' ../lisp/version.el \ |
|---|
| 203 |
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'` |
|---|
| 204 |
if [ ! "${version}" ]; then |
|---|
| 205 |
echo "${progname}: can't find current Emacs version in \`./lisp/version.el'" >&2 |
|---|
| 206 |
exit 1 |
|---|
| 207 |
fi |
|---|
| 208 |
|
|---|
| 209 |
echo Version numbers are $version and $shortversion |
|---|
| 210 |
|
|---|
| 211 |
### Make sure we don't already have a directory emacs-${version}. |
|---|
| 212 |
|
|---|
| 213 |
emacsname="emacs-${version}${new_extension}" |
|---|
| 214 |
|
|---|
| 215 |
if [ -d ${emacsname} ] |
|---|
| 216 |
then |
|---|
| 217 |
echo Directory "${emacsname}" already exists >&2 |
|---|
| 218 |
exit 1 |
|---|
| 219 |
fi |
|---|
| 220 |
|
|---|
| 221 |
### Make sure the subdirectory is available. |
|---|
| 222 |
tempparent="make-package.tmp.$$" |
|---|
| 223 |
if [ -d ${tempparent} ]; then |
|---|
| 224 |
echo "${progname}: staging directory \`${tempparent}' already exists. |
|---|
| 225 |
Perhaps a previous invocation of \`${progname}' failed to clean up after |
|---|
| 226 |
itself. Check that directories whose names are of the form |
|---|
| 227 |
\`make-dist.tmp.NNNNN' don't contain any important information, remove |
|---|
| 228 |
them, and try again." >&2 |
|---|
| 229 |
exit 1 |
|---|
| 230 |
fi |
|---|
| 231 |
|
|---|
| 232 |
if [ -d /Volumes/Emacs ]; then |
|---|
| 233 |
echo "${progname}: Already have an Emacs disc image mounted. Please |
|---|
| 234 |
eject that disc image and try again." >&2 |
|---|
| 235 |
exit 1 |
|---|
| 236 |
fi |
|---|
| 237 |
|
|---|
| 238 |
tempparentfull="`pwd`/${tempparent}" |
|---|
| 239 |
tempparentdist=${tempparentfull}/dist |
|---|
| 240 |
|
|---|
| 241 |
if test "$build_in_place" = "no"; then |
|---|
| 242 |
case ${builddir} in |
|---|
| 243 |
${srcdir}) |
|---|
| 244 |
tempbuild="make-package.build.$$" |
|---|
| 245 |
builddir="`pwd`/${tempbuild}" |
|---|
| 246 |
removable_build_dir=${builddir} |
|---|
| 247 |
mkdir -p ${builddir} |
|---|
| 248 |
;; |
|---|
| 249 |
[\\/]* | ?:[\\/]* ) #Absolutepath. |
|---|
| 250 |
mkdir -p ${builddir} |
|---|
| 251 |
;; |
|---|
| 252 |
*) |
|---|
| 253 |
mkdir -p ${builddir} |
|---|
| 254 |
builddir=`cd $builddir && pwd` |
|---|
| 255 |
;; |
|---|
| 256 |
esac |
|---|
| 257 |
fi |
|---|
| 258 |
# Location of install package |
|---|
| 259 |
packagedir=${builddir}/mac/Emacs.pkg |
|---|
| 260 |
|
|---|
| 261 |
echo Building in directory ${builddir} |
|---|
| 262 |
echo Installing into directory ${tempparentfull} >&2 |
|---|
| 263 |
|
|---|
| 264 |
### This trap ensures that the staging directory will be cleaned up even |
|---|
| 265 |
### when the script is interrupted in mid-career. |
|---|
| 266 |
trap "echo 'Interrupted...cleaning up the staging directory'; rm -rf ${tempparent} ${removable_build_dir} ${packagedir}; exit 1" 1 2 15 |
|---|
| 267 |
|
|---|
| 268 |
# Run configure in the new tempparent directory |
|---|
| 269 |
if test "$with_config" = "yes"; then |
|---|
| 270 |
(cd ${builddir}; ${srcdir}/configure ${config_options} --prefix=${prefix}) |
|---|
| 271 |
fi |
|---|
| 272 |
|
|---|
| 273 |
installprefix=${tempparentfull}${prefix} |
|---|
| 274 |
if test "$self_contained" = "yes"; then |
|---|
| 275 |
# If selfcontained, the local directory is Resources directory |
|---|
| 276 |
installprefix=$tempparentfull/$appsdir/$emapp/Contents/Resources |
|---|
| 277 |
fi |
|---|
| 278 |
|
|---|
| 279 |
|
|---|
| 280 |
make_options="prefix=${installprefix} $make_options" |
|---|
| 281 |
|
|---|
| 282 |
if test "$with_app" = "yes"; then |
|---|
| 283 |
make_options="carbon_appdir=${tempparentfull}/Applications $make_options" |
|---|
| 284 |
fi |
|---|
| 285 |
|
|---|
| 286 |
## Make bootstrap if .elc files are missing from distribution |
|---|
| 287 |
if [ ! -f ${srcdir}/lisp/abbrev.elc ]; then |
|---|
| 288 |
echo "Required .elc files missing; making bootstrap..." |
|---|
| 289 |
if ! (cd ${builddir}; make bootstrap $make_options); then |
|---|
| 290 |
echo "Make bootstrap failed... Aborting make-package." |
|---|
| 291 |
exit 2 |
|---|
| 292 |
fi |
|---|
| 293 |
fi |
|---|
| 294 |
|
|---|
| 295 |
if ! (cd ${builddir}; make install $make_options); then |
|---|
| 296 |
echo "Make failed... Aborting make-package." |
|---|
| 297 |
exit 1 |
|---|
| 298 |
fi |
|---|
| 299 |
|
|---|
| 300 |
if test "$full_dist" == "no"; then |
|---|
| 301 |
echo "Removing unneeded .el files" |
|---|
| 302 |
sharedir=$installprefix/share/emacs/$version |
|---|
| 303 |
find $sharedir/lisp $sharedir/leim -name "*.elc" -print | sed 's|\(.*\)\.elc$|/bin/rm -f \1.el|' | /bin/sh -s |
|---|
| 304 |
fi |
|---|
| 305 |
|
|---|
| 306 |
if test "$compressed_dist" == "yes" -a "$full_dist" == "yes"; then |
|---|
| 307 |
echo "Compressing .el files" |
|---|
| 308 |
sharedir=$installprefix/share/emacs/$version |
|---|
| 309 |
find $sharedir/lisp $sharedir/leim -name "*.elc" -print | sed 's|\(.*\)\.elc$|/usr/bin/gzip -9 \1.el|' | /bin/sh -s |
|---|
| 310 |
echo "Compressing info files" |
|---|
| 311 |
find $installprefix/info -type f ! -name dir -print | sed 's|\(.*\)$|/usr/bin/gzip -9 \1|' | /bin/sh -s |
|---|
| 312 |
fi |
|---|
| 313 |
|
|---|
| 314 |
if test "$with_app" == "yes"; then |
|---|
| 315 |
echo "Creating Emacs.app application" |
|---|
| 316 |
tempappdir=${tempparentfull}${appsdir} |
|---|
| 317 |
tempemapp=${tempappdir}/${emapp}/Contents/MacOS/Emacs |
|---|
| 318 |
## Delete any CVS files |
|---|
| 319 |
find ${tempappdir} -name "CVS" -type d -exec rm -rf {} \; |
|---|
| 320 |
|
|---|
| 321 |
## Have application be a symlink to ${prefix}/bin/emacs |
|---|
| 322 |
if test "$app_symlink" == "yes"; then |
|---|
| 323 |
echo "Creating application symlink" |
|---|
| 324 |
rm ${tempemapp} |
|---|
| 325 |
ln -s ${prefix}/bin/${emacsname} ${tempemapp} |
|---|
| 326 |
fi |
|---|
| 327 |
fi |
|---|
| 328 |
|
|---|
| 329 |
compver=`uname -p`-apple-darwin`uname -r` |
|---|
| 330 |
|
|---|
| 331 |
if test "$self_contained" = "yes"; then |
|---|
| 332 |
# Move shared files down to Resources directory |
|---|
| 333 |
mv $installprefix/share/emacs/$version/* $installprefix |
|---|
| 334 |
mv $installprefix/share/info $installprefix |
|---|
| 335 |
mv $installprefix/share/man $installprefix |
|---|
| 336 |
rm -rf $installprefix/share |
|---|
| 337 |
# These directories might remain in Resources |
|---|
| 338 |
mv $installprefix/bin $installprefix/../MacOS/bin |
|---|
| 339 |
mv $installprefix/libexec/emacs/$version/$compver $installprefix/../MacOS/libexec |
|---|
| 340 |
# Make the application binary a hard link |
|---|
| 341 |
rm $installprefix/../MacOS/Emacs |
|---|
| 342 |
ln $installprefix/../MacOS/bin/emacs $installprefix/../MacOS/Emacs |
|---|
| 343 |
fi |
|---|
| 344 |
|
|---|
| 345 |
|
|---|
| 346 |
# Remove unnecessary .el files |
|---|
| 347 |
#if test "$full_dist" = no; then |
|---|
| 348 |
#fi |
|---|
| 349 |
|
|---|
| 350 |
echo "Creating Package Info file" |
|---|
| 351 |
|
|---|
| 352 |
mkdir -p ${packagedir} |
|---|
| 353 |
mkdir ${packagedir}/Contents |
|---|
| 354 |
mkdir ${packagedir}/Contents/Resources |
|---|
| 355 |
mkdir ${packagedir}/Contents/Resources/English.lproj |
|---|
| 356 |
echo -n 'pmkrpkg1' > ${packagedir}/Contents/PkgInfo |
|---|
| 357 |
|
|---|
| 358 |
# Create ReadMe and License files |
|---|
| 359 |
cp ${srcdir}/COPYING ${packagedir}/Contents/Resources/License.txt |
|---|
| 360 |
cp ${srcdir}/mac/README ${packagedir}/Contents/Resources/ReadMe.txt |
|---|
| 361 |
|
|---|
| 362 |
infofile=${packagedir}/Contents/Resources/English.lproj/Emacs.info |
|---|
| 363 |
|
|---|
| 364 |
echo 'Title GNU Emacs' > ${infofile} |
|---|
| 365 |
echo "Version ${version}" >> ${infofile} |
|---|
| 366 |
echo "Description Install GNU Emacs ${version} as a command-line app and a Mac OS Application" >> ${infofile} |
|---|
| 367 |
echo 'DefaultLocation /' >> ${infofile} |
|---|
| 368 |
echo 'DeleteWarning' >> ${infofile} |
|---|
| 369 |
echo 'NeedsAuthorization YES' >> ${infofile} |
|---|
| 370 |
echo 'Required NO' >> ${infofile} |
|---|
| 371 |
echo 'Relocatable NO' >> ${infofile} |
|---|
| 372 |
echo 'RequiresReboot NO' >> ${infofile} |
|---|
| 373 |
echo 'UseUserMask NO' >> ${infofile} |
|---|
| 374 |
echo 'OverwritePermissions NO' >> ${infofile} |
|---|
| 375 |
echo 'InstallFat NO' >> ${infofile} |
|---|
| 376 |
|
|---|
| 377 |
### Set the install directory to install files as root... |
|---|
| 378 |
### Not sure if this is a good diea |
|---|
| 379 |
# echo "Setting owner to root" |
|---|
| 380 |
# chown -Rh 0 ${tempparentfull} |
|---|
| 381 |
|
|---|
| 382 |
echo "Creating pax file" |
|---|
| 383 |
(cd ${tempparentfull}; pax -w -f ${packagedir}/Contents/Resources/Emacs.pax .) |
|---|
| 384 |
echo "Compressing pax file" |
|---|
| 385 |
gzip ${packagedir}/Contents/Resources/Emacs.pax |
|---|
| 386 |
|
|---|
| 387 |
echo "Creating bom file" |
|---|
| 388 |
mkbom ${tempparentfull} ${packagedir}/Contents/Resources/Emacs.bom |
|---|
| 389 |
|
|---|
| 390 |
echo "Generating sizes file" |
|---|
| 391 |
sizesfile=${packagedir}/Contents/Resources/Emacs.sizes |
|---|
| 392 |
|
|---|
| 393 |
numFiles=`du -a ${tempparent} | wc -l` |
|---|
| 394 |
installedSize=`du -s ${tempparent} | cut -f1` |
|---|
| 395 |
compressedSize=`du -s ${packagedir} | cut -f1` |
|---|
| 396 |
|
|---|
| 397 |
echo "NumFiles ${numFiles}" > ${sizesfile} |
|---|
| 398 |
echo "InstalledSize ${installedSize}" >> ${sizesfile} |
|---|
| 399 |
echo "CompressedSize ${compressedSize}" >> ${sizesfile} |
|---|
| 400 |
cat ${sizesfile} |
|---|
| 401 |
|
|---|
| 402 |
echo "Creating Disc Image" |
|---|
| 403 |
## From hdiutil man page, a sector is 512k. Allocate an extra 5% for |
|---|
| 404 |
## directories and partition tables. |
|---|
| 405 |
sectorsAlloced=`echo 2.1*${compressedSize}|bc` |
|---|
| 406 |
hdiutil create -ov ${builddir}/mac/EmacsRW -sectors ${sectorsAlloced} |
|---|
| 407 |
## Need to format the disc image before mounting |
|---|
| 408 |
mountLoc=`hdid -nomount ${builddir}/mac/EmacsRW.dmg | grep HFS | cut -f1` |
|---|
| 409 |
/sbin/newfs_hfs -v Emacs ${mountLoc} |
|---|
| 410 |
hdiutil eject ${mountLoc} |
|---|
| 411 |
echo "Copying Package to Disc Image" |
|---|
| 412 |
hdid ${builddir}/mac/EmacsRW.dmg |
|---|
| 413 |
|
|---|
| 414 |
if test "$keep_directory" = "no"; then |
|---|
| 415 |
rm -rf ${tempparentfull} |
|---|
| 416 |
else |
|---|
| 417 |
mv ${tempparentfull} ${emacsname} |
|---|
| 418 |
fi |
|---|
| 419 |
|
|---|
| 420 |
if [ ! -d /Volumes/Emacs ]; then |
|---|
| 421 |
echo "Could not create disc image. The Emacs installer package (Emacs.pkg) |
|---|
| 422 |
in this directory should be correct. Please use the Disc Copy program to |
|---|
| 423 |
create a disc image." >&2 |
|---|
| 424 |
exit 0 |
|---|
| 425 |
fi |
|---|
| 426 |
|
|---|
| 427 |
cp -R ${packagedir} /Volumes/Emacs |
|---|
| 428 |
|
|---|
| 429 |
## Converting Disk Image to read-only |
|---|
| 430 |
echo 'Converting Disc Image to read-only' |
|---|
| 431 |
hdiutil eject ${mountLoc} |
|---|
| 432 |
hdiutil resize ${builddir}/mac/EmacsRW.dmg -sectors min |
|---|
| 433 |
if test "$comp_diskimage" = "yes"; then |
|---|
| 434 |
hdiutil convert ${builddir}/mac/EmacsRW.dmg -format UDZO -imagekey zlib-level=2 -o ${srcdir}/mac/EmacsInstaller.dmg |
|---|
| 435 |
else |
|---|
| 436 |
hdiutil convert ${builddir}/mac/EmacsRW.dmg -format UDRO -o ${srcdir}/mac/EmacsInstaller.dmg |
|---|
| 437 |
fi |
|---|
| 438 |
rm ${builddir}/mac/EmacsRW.dmg |
|---|
| 439 |
|
|---|
| 440 |
echo "Cleaning up the staging directory" |
|---|
| 441 |
rm -rf ${builddir}/mac/Emacs.pkg ${removable_build_dir} |
|---|
| 442 |
|
|---|
| 443 |
# arch-tag: 1b631d0d-9fde-4f71-80c0-33e0e5815515 |
|---|
| 444 |
### make-package ends here |
|---|
| 445 |
|
|---|