3 # Slackware build script for cin 5.1
5 # Copyright 2017 by WP Morrow (aka goodguy) <cin@lists.cinelerra-gg.org>
8 # Redistribution and use of this script, with or without modification, is
9 # permitted provided that the following conditions are met:
11 # 1. Redistributions of this script must retain the above copyright
12 # notice, this list of conditions and the following disclaimer.
14 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
15 # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
17 # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
23 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 VERSION="$( date +%Y%m%d )"
29 GITURL="git://git.cinelerra-gg.org/goodguy/cinelerra.git"
30 SLKBLD=`realpath "$0"`
32 if [ -z "$ARCH" ]; then
33 case "$( uname -m )" in
36 *) ARCH=$( uname -m ) ;;
42 PKG=$TMP/package-$PRGNAM
43 OUTPUT=${OUTPUT:-/tmp}
45 if [ "$ARCH" = "i486" ]; then
46 export CFG_VARS='ac_cv_header_xmmintrin_h=no'
47 SLKCFLAGS="-march=i486 -mtune=i686"
49 elif [ "$ARCH" = "i686" ]; then
50 SLKCFLAGS="-march=i686 -mtune=i686"
52 elif [ "$ARCH" = "x86_64" ]; then
63 mkdir -p $TMP $PKG $OUTPUT
65 rm -rf $PRGNAM-$VERSION
66 git clone --depth 1 $GITURL $PRGNAM-$VERSION
67 #rsh host tar -C /mnt0 -cf - cinelerra-gg | tar -xf -
68 #mv cinelerra-gg $PRGNAM-$VERSION
69 cd $PRGNAM-$VERSION/cinelerra-5.1
75 # Use ccache for faster rebuilding
76 # TODO: Let ffmpeg compile with ccache
77 export CC="ccache gcc"
81 --with-exec-name=$PRGNAM \
82 --build=$ARCH-slackware-linux
85 make install DESTDIR=$PKG
87 find $PKG -type f | while read f ; do
88 if ! ( file "$f" | grep ELF | grep -q -e "executable" -e "shared object" ); then
92 strip --strip-unneeded "$f"
93 done 2> /dev/null || true
95 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
96 cat $SLKBLD > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
99 cat > $PKG/install/slack-desc <<<"
100 |-----handy-ruler------------------------------------------------------|
101 $PRGNAM: $PRGNAM (GNU/Linux Video/Audio Studio)
102 $PRGNAM: 5.x variant of Cinelerra by WP Morrow (aka goodguy)
104 $PRGNAM: Cinelerra is the most advanced non-linear video editor
105 $PRGNAM: and compositor for Linux. It does primarily three main
106 $PRGNAM: things: capturing, compositing, and editing audio and
107 $PRGNAM: video with sample level accuracy.
109 $PRGNAM: Homepage: https://cinelerra-gg.org/"
110 cat > $PKG/install/doinst.sh <<<"
111 if [ -x /usr/bin/update-desktop-database ]; then
112 /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
115 # desktop icon data path
116 sed -e "s;^Icon=.*;Icon=/usr/share/pixmaps/$PRGNAM.xpm;" \
117 < image/cin.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
120 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}