File: orig-tar.sh

package info (click to toggle)
libqtpas 2.6%2B2.0.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,860 kB
  • sloc: cpp: 56,595; pascal: 13,727; sh: 44; makefile: 18
file content (36 lines) | stat: -rwxr-xr-x 794 bytes parent folder | download | duplicates (2)
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
#!/bin/sh -xe

PACKAGE_NAME=libqtpas
TMP_DIR=`/bin/mktemp -d -t ${PACKAGE_NAME}.XXXXXX` || exit 1
ORIG_PATH=$(pwd)

while test $# -gt 0
do
	case $1 in
		--upstream-version)
			shift
			VERSION=$1
			;;
		*)
			ORIG_SRC_TAR=$(readlink -m $1)
			;;
	esac
	shift
done

ORIG_SRC_DIR=lazarus/lcl/interfaces/qt5/cbindings
DEB_SRC_DIR=${PACKAGE_NAME}-${VERSION}+dfsg
DEB_SRC_TAR=${PACKAGE_NAME}_${VERSION}+dfsg.orig.tar.xz

cd ${TMP_DIR}
tar -axf ${ORIG_SRC_TAR} ${ORIG_SRC_DIR}
mv ${ORIG_SRC_DIR} ${DEB_SRC_DIR}
cd ${DEB_SRC_DIR}
find -name Makefile.fpc -execdir sh -c 'rm $(basename {} .fpc)' ';'
find '(' -name '*.icns' -or -name '*.java' ')' -exec chmod a-x {} ';'
find -empty -delete
cd ..
tar -acf ${DEB_SRC_TAR} ${DEB_SRC_DIR}
cd ${ORIG_PATH}
mv ${TMP_DIR}/${DEB_SRC_TAR} ../
rm -rf ${TMP_DIR}