-
Notifications
You must be signed in to change notification settings - Fork 13
/
deb-opengv.py
executable file
·54 lines (46 loc) · 1.49 KB
/
deb-opengv.py
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
54
#!/usr/bin/env python3
from deblib import *
# General config
set_name("libopengv")
set_homepage("https://github.com/laurentkneip/opengv")
#Download it
git_clone("https://github.com/laurentkneip/opengv.git")
set_version("1.0", gitcount=True)
add_version_suffix("-deb2")
set_debversion(1)
# Fix march=native producing illegal instructions
# We assume core2 is a good general purpose basis
cmd("sed -i -e 's/march=native/march=core2/g' CMakeLists.txt".format(get_name()))
pack_source()
create_debian_dir()
add_build_dependencies(
"libeigen3-dev",
"libboost-python-dev",
"python-numpy"
)
#Use the existing COPYING file
copy_license()
#Create the changelog (no messages - dummy)
create_dummy_changelog()
# Create rules file
build_config_cmake(cmake_opts=["-DBUILD_PYTHON=ON"])
install_usr_dir_to_package("usr/include", "dev")
install_usr_dir_to_package("usr/CMake", "dev")
install_usr_dir_to_package("usr/lib/python2.7", "python")
build_config["configure"].append(
"echo 'add_definitions(\"-std=gnu++11\")' >> python/CMakeLists.txt"
)
write_rules()
#Create control file
intitialize_control()
control_add_package(description="OpenGV geometry view library")
control_add_package("dev",
depends=[depends_main_package()],
arch_specific=False,
description="OpenGV geometry view library (development files)")
control_add_package("python",
arch_specific=True,
depends=["python", "python-numpy"],
description="OpenGV geometry view library (python bindings)")
#Build it
commandline_interface()