File: release_bin

package info (click to toggle)
xxdiff 1%3A4.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,716 kB
  • ctags: 2,245
  • sloc: cpp: 18,495; python: 6,134; sh: 1,543; ansic: 1,535; perl: 308; lex: 284; yacc: 279; lisp: 250; tcl: 213; makefile: 82
file content (70 lines) | stat: -rwxr-xr-x 1,599 bytes parent folder | download | duplicates (6)
1
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh
#
# $RCSfile$
#

if [ ! -d "adm" ]; then
     echo "You must be running this script from the topdir directory."
     exit 1;
fi

# Package for simple binary release.
VERSION=`adm/get_version`
echo "Making binary release version $VERSION"

XXDIFF=xxdiff

PLAT=`adm/config.guess`
case $PLAT in
        *sparc*)
        PEXT=sparc ;;

        *mips*)
        PEXT=mips ;;

        *linux*)
        PEXT=i386 ;;

        *apple-darwin*)
        PEXT=osx 
        BUNDLE=xxdiff.app
        XXDIFF=$BUNDLE/Contents/MacOS/xxdiff
        ;;
esac
    
PDIR=xxdiff-$VERSION.$PEXT
ROOT=..

mkdir $ROOT/$PDIR
cp -rf bin/* $ROOT/$PDIR

if [ $PEXT = osx ]; then
    rm -f $ROOT/$PDIR/*.dmg # the one created by make deploy
    if [ ! -e $ROOT/$PDIR/$BUNDLE/Contents/Resources/qt.conf ]; then
        # Copy all required Qt libs in the bundle
        macdeployqt $ROOT/$PDIR/$BUNDLE
        # Strip 32bit part of the libraries, to just keep the x86_64 part
        for lib in `find $ROOT/$PDIR/$BUNDLE -type f -name '*.dylib'; find $ROOT/$PDIR/$BUNDLE/Contents/Frameworks -type f -name 'Qt*'`; do
            if [ `lipo $lib -info | grep -c 'Non-fat'` != "1" ]; then
                lipo $lib -thin x86_64 -output $lib
            fi
        done
    fi
fi

strip $ROOT/$PDIR/$XXDIFF

cp src/xxdiff.1 $ROOT/$PDIR
cp README $ROOT/$PDIR
cp CHANGES $ROOT/$PDIR

$ROOT/$PDIR/$XXDIFF --help-html > $ROOT/$PDIR/xxdiff-doc.html

cd ..
if [ $PEXT != osx ]; then
    tar cvf - $PDIR | gzip > $PDIR.tar.gz
else
    hdiutil create -ov -fs HFS+ -srcfolder $PDIR -volname "xxdiff $VERSION" $PDIR.dmg
fi

rm -rf $PDIR