File: debian-version.sh

package info (click to toggle)
x264 2:0.155.2917+git0a84d98-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,732 kB
  • sloc: ansic: 67,842; asm: 37,367; sh: 4,416; lisp: 1,795; python: 1,046; perl: 905; makefile: 385
file content (11 lines) | stat: -rw-r--r-- 509 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh -e

# mimics upstream's version.h but works inside the debian package
VENDOR=`dpkg-vendor --query vendor`
PACKAGE_VERSION=`dpkg-parsechangelog  | awk '/^Version:/ {print $$2}'`
BUILD=`grep '#define X264_BUILD' < x264.h | sed -e 's/.* \([1-9][0-9]*\).*/\1/'`
POINTVER=`echo $PACKAGE_VERSION | sed -e 's/[0-9]\:\(0\.[0-9]*\.[0-9]*\).*/\1/'`

echo "#define X264_VERSION \" ${VENDOR}_${PACKAGE_VERSION}\"" >> config.h
echo "#define X264_POINTVER \"$POINTVER ${VENDOR}_${PACKAGE_VERSION}\"" >> config.h