File: build_ips

package info (click to toggle)
darktable 5.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 65,660 kB
  • sloc: ansic: 367,579; cpp: 102,778; xml: 20,091; lisp: 15,099; sh: 3,771; javascript: 3,264; perl: 1,925; python: 1,551; ruby: 975; makefile: 543; asm: 46; sql: 38; awk: 21
file content (66 lines) | stat: -rw-r--r-- 1,724 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
#!/bin/bash
#
# Copyright (c) 2012, James C. McPherson. All rights reserved.
#
# This script takes an installed build of darktable
# (see https://www.darktable.org) and turns it into a new IPS package
# ready for distribution
#

PKGSEND=/usr/bin/pkgsend
PKGRECV=/usr/bin/pkgrecv
PKGREPO=/usr/bin/pkgrepo
PKGDEPOT=/usr/lib/pkg.depotd

MKDIR=/usr/bin/mkdir
ECHO=/usr/bin/echo
GZIP=/usr/bin/gzip
SED=/usr/bin/sed
SLEEP=/usr/bin/sleep
KILL=/usr/bin/kill
PGREP=/usr/bin/pgrep
AWK=/usr/bin/nawk
GIT=/usr/bin/git

REPODIR=/tmp/darktable.repo.$$
# change MYPUBLISHER if you want
MYPUBLISHER=
CSET=`git rev-parse --short=15 --verify HEAD`
# change the VERSION depending on what the latest Release is
RELEASE=1.0.3
SUFFIX=
if [ "$1" = "-r" ]; then
    SUFFIX=""
    VERSION=${RELEASE}
else
    SUFFIX="-git"
    VERSION=`git describe HEAD |awk -F"-" '{print $3}'`
fi


if [ ! -f /opt/darktable/share/doc/darktable/README.Solaris ]; then
    sudo cp README.Solaris /opt/darktable/share/doc/darktable
fi

# update the manifest...
${SED} -e"s,|CHANGESET|,$CSET,g" -e"s,|VERSION|,$VERSION,g" \
    -e"s,|SUFFIX|,$SUFFIX,g" -e"s,|RELEASE|,${RELEASE},g" \
    < darktable-manifest.pkg5.base > manifest.$CSET
${MKDIR} -p ${REPODIR}
${PKGREPO} create ${REPODIR}
${PKGREPO} add-publisher -s ${REPODIR} ${MYPUBLISHER:-JMCP}

# startup the pkg.depotd server on a high (>1024) port number
${PKGDEPOT} -p 24602 -d ${REPODIR} > /tmp/dt.depotd.log.$$ 2>&1 &
${SLEEP} 30
${PKGSEND} publish -s http://localhost:24602 --fmri-in-manifest \
	-d / manifest.$CSET

${PKGRECV} -s http://localhost:24602 -d Darktable.$CSET.p5p \
    -a "darktable/darktable$SUFFIX"
${GZIP} -9 Darktable.$CSET.p5p

# kill off the depotd:
${KILL} $( ${PGREP} -n pkg.depotd )