Skip to content

Commit

Permalink
Package frameworks for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopper262 committed Feb 26, 2019
1 parent a408edd commit 9e3fd32
Show file tree
Hide file tree
Showing 18 changed files with 128 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
**/*.tar.gz
**/*.tar.bz2
**/*.zip
**/*.dmg
**/*.framework
*/src
*/objs
*/installs
*/License.txt
7 changes: 7 additions & 0 deletions boost/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export URL="https://dl.bintray.com/boostorg/release/$VERSION/source/boost_$VERSI
export DIRNAME="${PROJ}_${VERSIONDL}"
export FWKS=(libboost_system libboost_filesystem boost)
export CONFIGOPTS=""
export LICENSE="LICENSE_1_0.txt"

DEV="/Applications/Xcode.app/Contents/Developer"
SDKROOT="$DEV/Platforms/MacOSX.platform/Developer/SDKs"
Expand Down Expand Up @@ -36,6 +37,12 @@ case "$DLNAME" in
esac
mv "$DIRNAME" "$SRCDIR"

if [ "$LICENSE" != "" ]; then
if [ -f "$SRCDIR/$LICENSE" ]; then
cp "$SRCDIR/$LICENSE" "License.txt"
fi
fi

if [ -d "$COMPILEDIR" ]; then rm -r "$COMPILEDIR"; fi
if [ -d "$INSTALLDIR" ]; then rm -r "$INSTALLDIR"; fi

Expand Down
6 changes: 6 additions & 0 deletions build-std.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ case "$DLNAME" in
esac
mv "$DIRNAME" "$SRCDIR"

if [ "$LICENSE" != "" ]; then
if [ -f "$SRCDIR/$LICENSE" ]; then
cp "$SRCDIR/$LICENSE" "License.txt"
fi
fi

if [ -d "$COMPILEDIR" ]; then rm -r "$COMPILEDIR"; fi
if [ -d "$INSTALLDIR" ]; then rm -r "$INSTALLDIR"; fi

Expand Down
23 changes: 23 additions & 0 deletions copy-prebuilt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

if [ "$DLNAME" == "" ]; then DLNAME="${URL##*/}"; fi

# grab dmg
if [ ! -f "$DLNAME" ]; then
curl -L -o "$DLNAME" "$URL"
fi

# mount dmg
DMGROOT=`hdiutil attach "$DLNAME" | tail -1 | cut -f 3 -d $'\t'`

# copy files
rsync -rlt "$DMGROOT"/*.framework ./

if [ "$LICENSE" != "" ]; then
if [ -f "$DMGROOT/$LICENSE" ]; then
cp "$DMGROOT/$LICENSE" "License.txt"
fi
fi

# unmount dmg
diskutil unmount "$DMGROOT"
1 change: 1 addition & 0 deletions ffmpeg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export DYLIBNAME_libavcodec="libavcodec.58.dylib"
export DYLIBNAME_libavformat="libavformat.58.dylib"
export DYLIBNAME_libavutil="libavutil.56.dylib"
export DYLIBNAME_swscale="libswscale.5.dylib"
export LICENSE="LICENSE.md"

../build-std.sh

Expand Down
1 change: 1 addition & 0 deletions jpeg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export PROJ="jpeg"
export VERSION="9c"
export URL="http://www.ijg.org/files/jpegsrc.v9c.tar.gz"
export CONFIGOPTS="--disable-static"
export LICENSE="README"

../build-std.sh
1 change: 1 addition & 0 deletions ogg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export URL="http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz"
export DIRNAME="lib$PROJ-$VERSION"
export CONFIGOPTS="--disable-shared"
export NOPACKAGING="1"
export LICENSE="COPYING"

../build-std.sh
1 change: 1 addition & 0 deletions png/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export VERSION="1.6.36"
export URL="https://download.sourceforge.net/libpng/libpng-1.6.36.tar.gz"
export DIRNAME="lib$PROJ-$VERSION"
export CONFIGOPTS="--disable-static"
export LICENSE="LICENSE"

../build-std.sh

Expand Down
49 changes: 49 additions & 0 deletions release/build-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

SIGNATURE="$1"

RELDIR=`pwd`
PKGDIR="$RELDIR/objs"
if [ -d "$PKGDIR" ]; then rm -r "$PKGDIR"; fi
mkdir "$PKGDIR"
LICDIR="$PKGDIR/Licenses"
mkdir "$LICDIR"
ln -s /Library/Frameworks "$PKGDIR/Install to Frameworks"

# Static libraries
for DIR in ogg vorbis vpx; do
cd ../$DIR
./build.sh
if [ -f "License.txt" ]; then
cp "License.txt" "$LICDIR/$DIR License.txt"
fi
cd "$RELDIR"
done

# Frameworks (binary and source)
for DIR in sdl2 sdl2_image sdl2_net sdl2_ttf \
boost ffmpeg jpeg png speex speexdsp zziplib; do
cd ../$DIR
./build.sh
for FWK in *.framework; do
rsync -rlt "$FWK" "$PKGDIR/"
if [ -f "License.txt" ]; then
cp "License.txt" "$LICDIR/${FWK%.framework} License.txt"
fi
done
cd "$RELDIR"
done

# create dmg
VERSION=`date +'%Y%m%d'`
DMGPATH="aleph-mac-frameworks-$VERSION.dmg"
if [ -f "$DMGPATH" ]; then rm "$DMGPATH"; fi
hdiutil create -ov -fs HFS+ -format UDBZ -layout GPTSPUD -srcfolder "$PKGDIR" -volname "Aleph One Frameworks $VERSION" "$DMGPATH"
if [ "$SIGNATURE" == "" ]; then
echo "No signature provided. Disk image is unsigned."
else
codesign -s "$SIGNATURE" "$DMGPATH"
spctl -a -t open --context context:primary-signature -v "$DMGPATH"
fi

rm -r "$PKGDIR"
8 changes: 8 additions & 0 deletions sdl2/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

export PROJ="SDL2"
export VERSION="2.0.9"
export URL="https://www.libsdl.org/release/$PROJ-$VERSION.dmg"
export LICENSE="License.txt"

../copy-prebuilt.sh
8 changes: 8 additions & 0 deletions sdl2_image/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

export PROJ="SDL2_image"
export VERSION="2.0.4"
export URL="https://www.libsdl.org/projects/SDL_image/release/$PROJ-$VERSION.dmg"
export LICENSE="ReadMe.txt"

../copy-prebuilt.sh
8 changes: 8 additions & 0 deletions sdl2_net/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

export PROJ="SDL2_net"
export VERSION="2.0.1"
export URL="https://www.libsdl.org/projects/SDL_net/release/$PROJ-$VERSION.dmg"
export LICENSE="ReadMe.txt"

../copy-prebuilt.sh
8 changes: 8 additions & 0 deletions sdl2_ttf/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

export PROJ="SDL2_ttf"
export VERSION="2.0.15"
export URL="https://www.libsdl.org/projects/SDL_ttf/release/$PROJ-$VERSION.dmg"
export LICENSE="ReadMe.txt"

../copy-prebuilt.sh
1 change: 1 addition & 0 deletions speex/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export PROJ="speex"
export VERSION="1.2.0"
export URL="http://downloads.xiph.org/releases/speex/$PROJ-$VERSION.tar.gz"
export CONFIGOPTS="--disable-static"
export LICENSE="COPYING"

../build-std.sh
1 change: 1 addition & 0 deletions speexdsp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export PROJ="speexdsp"
export VERSION="1.2rc3"
export URL="http://downloads.xiph.org/releases/speex/$PROJ-$VERSION.tar.gz"
export CONFIGOPTS="--disable-static"
export LICENSE="COPYING"

../build-std.sh
1 change: 1 addition & 0 deletions vorbis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export DIRNAME="lib$PROJ-$VERSION"
OGGBASE=$(cd "../ogg/installs/x86_64" && pwd)
export CONFIGOPTS="--disable-shared --disable-oggtest --with-ogg-libraries=$OGGBASE/lib --with-ogg-includes=$OGGBASE/include"
export NOPACKAGING="1"
export LICENSE="COPYING"

../build-std.sh
1 change: 1 addition & 0 deletions vpx/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export DIRNAME="lib$PROJ-$VERSION"
export CONFIGOPTS="--disable-examples --disable-unit-tests --target=x86_64-darwin13-gcc"
export PATH_EXTRA="/usr/local/bin" # for nasm
export NOPACKAGING="1"
export LICENSE="LICENSE"

../build-std.sh
1 change: 1 addition & 0 deletions zziplib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ export VERSION="0.13.69"
export URL="https://github.com/gdraheim/zziplib/archive/v0.13.69.tar.gz"
export CONFIGOPTS="--disable-static"
export DYLIBNAME_libzziplib="libzzip.dylib"
export LICENSE="COPYING.LIB"

../build-std.sh

0 comments on commit 9e3fd32

Please sign in to comment.