Skip to content

Commit 56f210a

Browse files
committed
version number extraction and new location
1 parent 9b0d3d4 commit 56f210a

File tree

9 files changed

+96
-0
lines changed

9 files changed

+96
-0
lines changed

distros/deb/liblsl-dev.control

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Section: contrib/libs
2+
Maintainer: Giso Grimm <[email protected]>
3+
Description: Lab streaming layer API - header files.
4+
The lab streaming layer is a simple all-in-one approach to streaming
5+
experiment data between applications in a lab, e.g. instrument time series,
6+
event markers, audio, and so on.
7+
Homepage: https://github.com/sccn/labstreaminglayer/

distros/deb/liblsl-dev.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"../LSL/liblsl/include/lsl_cpp.h","usr/include/"
2+
"../LSL/liblsl/include/lsl_c.h","usr/include/"

distros/deb/liblsl-dev.dep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
liblsl(VERSION)

distros/deb/liblsl.control

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Section: contrib/libs
2+
Maintainer: Giso Grimm <[email protected]>
3+
Description: Lab streaming layer API.
4+
The lab streaming layer is a simple all-in-one approach to streaming
5+
experiment data between applications in a lab, e.g. instrument time series,
6+
event markers, audio, and so on.
7+
Homepage: https://github.com/sccn/labstreaminglayer/

distros/deb/liblsl.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"../LSL/liblsl/build/src/liblsl.so","usr/lib/"
2+
"../LSL/liblsl/LICENSE","usr/share/doc/liblsl/"

distros/deb/liblsl.dep

Whitespace-only changes.

distros/deb/mkdeb

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/sh
2+
# Redistribute the files in the distribution to the linux file system
3+
CSV="$1"
4+
VERSION="$2"
5+
ARCH="$3"
6+
if test -z "${VERSION}"; then
7+
echo "Usage: mkdeb file.csv VERSION [ARCH]"
8+
exit 1
9+
fi
10+
PACKAGE=`echo "${CSV}"|sed -e 's/^.*\///1' -e 's/\.csv//1'|tr '[:upper:]' '[:lower:]'`
11+
PACKAGEBASE=`echo "${CSV}"|sed -e 's/\.csv//1'`
12+
rm -Rf debian
13+
mkdir -p debian/DEBIAN
14+
#cat "${CSV}" | sed -e 's/\",\"/\" \"debian\//g' -e 's/"//g' -e 's/^/..\//1' -e 's/[^[:blank:]]* //1' | sort -u | xargs -l1 mkdir -p
15+
#cat "${CSV}" | sed -e 's/\",\"/\" \"debian\//g' -e 's/^/..\//1' | xargs -l1 cp || exit 1
16+
cat "${CSV}" | sed -e 's/\",\"/\" \"debian\//g' -e 's/"//g' -e 's/[^[:blank:]]* //1' | sort -u | xargs -l1 mkdir -p
17+
cat "${CSV}" | sed -e 's/\",\"/\" \"debian\//g' | xargs -l1 cp || exit 1
18+
19+
# All files in the distribution should be readable by everyone
20+
chmod -R a+r debian
21+
22+
#
23+
## Discover information for this distribution
24+
#
25+
distname="${PACKAGE}"
26+
version="${VERSION}"
27+
if test -z "${ARCH}"; then
28+
ARCH=$(uname -m | sed -e s/i686/i386/ -e s/x86_/amd/)
29+
echo "Architecture ${ARCH} detected."
30+
fi
31+
packagename=$(echo "$distname" | sed -e "s/_/-/g")
32+
#packageversion="$version"-$(date +%Y%m%d)
33+
packageversion="$version"
34+
deb_depends="Depends: "`cat "${PACKAGEBASE}.dep"|sed -e "s/(VERSION)/(=${VERSION})/g"`
35+
deb_provides="Provides: ${PACKAGE}"
36+
inst_size=`du debian|tail -1|sed -e 's/\([0-9]*\).*/\1/1'`
37+
38+
cat <<EndOfControl | sed -e '/^[[:alnum:]]*:[[:blank:]]*$/ d'> debian/DEBIAN/control
39+
Package: $packagename
40+
Version: $packageversion
41+
Priority: optional
42+
Architecture: $ARCH
43+
$deb_depends
44+
$deb_provides
45+
Installed-Size: $inst_size
46+
EndOfControl
47+
cat "${PACKAGEBASE}.control" >> debian/DEBIAN/control
48+
49+
test -e "${PACKAGEBASE}.conffiles" && cat "${PACKAGEBASE}.conffiles" > debian/DEBIAN/conffiles
50+
51+
fakeroot=/usr/bin/fakeroot
52+
test -x $fakeroot || fakeroot=""
53+
$fakeroot dpkg-deb --build debian
54+
mv debian.deb "$packagename"_"$packageversion"_"${ARCH}".deb
55+
rm -Rf debian
56+
57+
# Local Variables:
58+
# mode: shell-script
59+
# End:

distros/deb/pack.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
VERSIONINT=`cat ../../src/common.h | grep LSL_LIBRARY_VERSION | sed 's/[^[0-9]*\([0-9]*\)[^[0-9]*/\1/1'`
4+
VERSION_MAJOR=$(($VERSIONINT / 100))
5+
VERSION_MINOR=$(($VERSIONINT % 100))
6+
7+
VERSION=$VERSION_MAJOR.$VERSION_MINOR
8+
echo building debian packages for version $VERSION
9+
10+
# first build liblsl:
11+
mkdir -p ../LSL/liblsl/build
12+
(cd ../LSL/liblsl/build && cmake ..)
13+
make -C ../LSL/liblsl/build
14+
15+
./mkdeb liblsl.csv $VERSION
16+
./mkdeb liblsl-dev.csv $VERSION
17+

distros/deb/version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.11

0 commit comments

Comments
 (0)