-
Notifications
You must be signed in to change notification settings - Fork 13
/
deb-vexcl.sh
executable file
·53 lines (53 loc) · 1.89 KB
/
deb-vexcl.sh
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
#!/bin/bash
#DEB package builder for VexCL
#This script is released under Apache License v2.0
#Copyright (c) 2013 Uli Köhler
export NAME=libvexcl-dev
export VERSION=0.8.6git
export DEBVERSION=${VERSION}-1
#Download it
git clone --depth 1 git://github.com/ddemidov/vexcl.git
(cd vexcl && rm -rf .git && cd ..)
export VERSION=0.8.6-git$(cd vexcl && git rev-list --all | wc -l)
export DEBVERSION=${VERSION}-1
tar cJvf ${NAME}_${VERSION}.orig.tar.xz vexcl
cd vexcl
rm -rf debian
mkdir -p debian
#Use the existing COPYING file
touch debian/copyright
#Create the changelog (no messages - dummy)
dch --create -v $DEBVERSION --package ${NAME} ""
#Create copyright file
cp COPYING debian/copyright
#Create control file
echo "Source: $NAME" > debian/control
echo "Maintainer: None <none@example.com>" >> debian/control
echo "Section: misc" >> debian/control
echo "Priority: optional" >> debian/control
echo "Standards-Version: 3.9.2" >> debian/control
echo "Build-Depends: debhelper (>= 8), cmake " >> debian/control
#Dev package
echo "" >> debian/control
echo "Package: $NAME" >> debian/control
echo "Architecture: all" >> debian/control
echo "Depends: ${shlibs:Depends}, ${misc:Depends}" >> debian/control
echo "Homepage: https://github.com/ddemidov/vexcl" >> debian/control
echo "Description: VexCL" >> debian/control
#Create rules file
echo '#!/usr/bin/make -f' > debian/rules
echo '%:' >> debian/rules
echo -e '\tdh $@' >> debian/rules
echo 'override_dh_auto_configure:' >> debian/rules
echo -e "\tcmake -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/debian/${NAME}/usr ." >> debian/rules
echo 'override_dh_auto_build:' >> debian/rules
echo -e '\tmake' >> debian/rules
echo 'override_dh_auto_install:' >> debian/rules
echo -e "\tmkdir -p debian/$NAME-dev/usr" >> debian/rules
echo -e '\tmake install' >> debian/rules
#Create some misc files
mkdir -p debian/source
echo "8" > debian/compat
echo "3.0 (quilt)" > debian/source/format
#Build it
debuild -us -uc