File: repackage-upstream-src

package info (click to toggle)
dotlrn 2.5.0%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 109,504 kB
  • ctags: 21,125
  • sloc: tcl: 219,608; sql: 202,152; xml: 127,658; java: 7,268; php: 4,780; sh: 2,180; perl: 1,207; makefile: 110
file content (29 lines) | stat: -rwxr-xr-x 922 bytes parent folder | download
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
#!/bin/sh
#
# Executed by uscan, repackages the upstream source removing
# all non-DFSG content.
   
set -e
   
PACKAGE=$(dpkg-parsechangelog | sed -rn '/^Source:/ {s/^Source: //; p}')
VERSION=$(echo $2)
FILE=$3
DIR="$PACKAGE-$VERSION"
DFSG_FILE=$(echo "$FILE" | sed 's/\.orig\.tar\.gz$/+dfsg2\.orig\.tar\.gz/')
  
# Unpack
tar xzf $FILE \
 --exclude "*/packages/acs-templating/www/resources/xinha-nightly/iconsets/Tango" \
 --exclude "*/packages/acs-templating/www/resources/xinha-nightly/images/tango" \
 --exclude "*/packages/acs-content-repository/java/PerlTools.jar" \
 --exclude "*/packages/chat/www/chat.jar" \
 --exclude "*/packages/lorsm/www/delivery-scorm/stuff.jar" \
 --exclude "*/packages/lorsm/www/delivery/stuff.jar" \
 --exclude "*/packages/acs-templating/www/resources/tinymce/jscripts/tiny_mce/plugins/media/img/flv_player.swf"
  
# Repack
tar cz -f $FILE $DIR
mv $FILE $DFSG_FILE
  
# Clean
rm -rf $DIR