blob: f93b66433c69cc9856de1cba720d6fb679cf6b89 (
plain)
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
|
#!/bin/bash
#
# Slackware build script for IntelliJIDEA
# Written by Mario Antunes (mariolpantunes@gmail.com)
# This script is just a binary repackaging.
PRGNAM=idea
ARCNAM=ideaIC
VERSION=${VERSION:-13.1.3}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
ARCH=noarch
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
set -e
rm -rf $PKG
mkdir -p $TMP $PKG/opt/ $OUTPUT
cd $PKG/opt/
tar xvf $CWD/$ARCNAM-$VERSION.tar.gz
mv * $PRGNAM
mkdir -p $PKG/etc/profile.d
cat << EOF > $PKG/etc/profile.d/$PRGNAM.sh
#!/bin/sh
export IDEA_HOME=/opt/idea
export PATH=\$PATH:\$IDEA_HOME/bin
EOF
cat << EOF > $PKG/etc/profile.d/$PRGNAM.csh
#!/bin/csh
setenv IDEA_HOME /opt/idea
setenv PATH \$PATH:\$IDEA_HOME/bin
EOF
chmod 755 $PKG/etc/profile.d/*
install -D -m 0644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
install -D -m 0644 $PKG/opt/$PRGNAM/bin/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
# Prevent fsnotifer and fsnotifier64 from being striped
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| grep -v "fsnotifier" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd $PKG/opt/$PRGNAM
mv *.txt license $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|