File: build-install-pkg.sh

package info (click to toggle)
doublecmd 1.1.30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,968 kB
  • sloc: pascal: 374,335; sh: 1,180; ansic: 724; makefile: 132; python: 52; xml: 16
file content (48 lines) | stat: -rwxr-xr-x 1,045 bytes parent folder | download | duplicates (3)
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
#!/bin/bash

# This script build and install Double Commander Arch Linux package

# Temp directory
DC_TEMP_DIR=/var/tmp/doublecmd-$(date +%y.%m.%d)
# Directory for DC source code
DC_SOURCE_DIR=$DC_TEMP_DIR/src
# Widgetset library (gtk2 or qt)
LCL_PLATFORM=$1

# Set widgetset
if [ -z $LCL_PLATFORM ]; then
  export LCL_PLATFORM=gtk2
fi

# Recreate temp directory
rm -rf $DC_TEMP_DIR
mkdir -p $DC_TEMP_DIR

# Export from GIT
pushd ../../
mkdir -p $DC_SOURCE_DIR
git archive HEAD | tar -x -C $DC_SOURCE_DIR
popd

# Save revision number
DC_REVISION=`$(pwd)/update-revision.sh ../../ $DC_SOURCE_DIR`

# Prepare PKGBUILD file
cp -a pkg/doublecmd-svn.install $DC_TEMP_DIR
echo "$DC_REVISION" > $DC_SOURCE_DIR/revision.txt
cp -a pkg/doublecmd-$LCL_PLATFORM.pkgbuild $DC_TEMP_DIR/PKGBUILD

# Set temporary HOME for lazarus primary config directory
export HOME=$DC_TEMP_DIR
mkdir -p $DC_TEMP_DIR/.lazarus
cp -a pkg/environmentoptions.xml $DC_TEMP_DIR/.lazarus

pushd $DC_TEMP_DIR

# Build and install
makepkg --install

popd

# Clean
rm -rf $DC_TEMP_DIR