Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup DEB packages #8

Draft
wants to merge 69 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
ed17b96
moved old travis file to ci
ar13pit Oct 16, 2018
84f7330
moved old travis file to ci
ar13pit Oct 16, 2018
1804a00
added Dockerfile and ignore
ar13pit Oct 16, 2018
d9d3e84
removed environment variable checks, new build function
ar13pit Nov 3, 2018
8a936b5
export root directory
ar13pit Nov 3, 2018
3f6f1cc
added install of sequitur for voxforge dataset
ar13pit Nov 18, 2018
a1e0444
changed exit to return and make jobs to 8
ar13pit Dec 28, 2018
d82bca6
moved install dependencies to new function
ar13pit Jan 27, 2019
982a677
suppress output of check_dependencies
ar13pit Jan 29, 2019
92c0b93
added g++ version check
ar13pit Jan 29, 2019
29c59c5
added srilm and suppressed output of sequitur
ar13pit Jan 29, 2019
fa4c53b
corrected gpp_version_num extraction
ar13pit Feb 2, 2019
91b5d44
isolated install dependencies from build
ar13pit Feb 2, 2019
49d5fa6
ignore install logs
ar13pit Feb 2, 2019
6c0a1ed
added subroutine to build gst
ar13pit Feb 2, 2019
8a31697
changed build flag to tue and added online gst
ar13pit Feb 2, 2019
8cd0c6e
added gst-plugin to GST_PLUGIN_PATH
ar13pit Feb 2, 2019
9e6ec3f
added gstreamer plugin test
ar13pit Feb 2, 2019
abb1016
updated usage and dependencies
ar13pit Feb 2, 2019
cf1658a
Merge pull request #1 from tue-robotics/install_cleanup
DvanDinther Feb 2, 2019
f243cff
removed exit-return swap in check dependencies
ar13pit Feb 2, 2019
e55b6f7
added return on failure
ar13pit Feb 2, 2019
f7f1096
rm irstlm built dir and download srilm if not existing
ar13pit Feb 12, 2019
7413f6c
changed return to exit
ar13pit Feb 12, 2019
2a72291
added tue-get kaldi installation
ar13pit Feb 20, 2019
3173d31
Fix '[WARNING]: Empty continuation line found in: ...'
LoyVanBeek Feb 26, 2019
146183c
removed deprecated command
ar13pit Feb 27, 2019
4a61221
made tue-env tools available to intermediate image
ar13pit Feb 27, 2019
2cda16f
Merge pull request #2 from tue-robotics/fix/install
ar13pit Mar 3, 2019
1060c83
update base image and targets repo branch
ar13pit Mar 3, 2019
33a5d5a
cleanup
ar13pit Mar 3, 2019
9db65c5
ignore everthing
ar13pit Mar 4, 2019
cb463cd
fixed command grouping and added gst-plugin option
ar13pit Mar 4, 2019
cf184f3
removed targets checkout
ar13pit Mar 4, 2019
fe74433
added comment to change image tag to master after PR
ar13pit Mar 4, 2019
70218ae
Merge pull request #3 from tue-robotics/ar13pit/docker-prep
ar13pit Mar 4, 2019
cb7caee
made wget quiet
ar13pit Mar 5, 2019
07ddba1
updated base image
ar13pit Mar 12, 2019
a885c94
Merge pull request #4 from tue-robotics/update/dockerfile
ar13pit Mar 12, 2019
f9f8f86
added fast compilation
ar13pit Apr 2, 2019
593ff56
moved g++ version check to targets repo
ar13pit Apr 2, 2019
19d6f02
fix duplicate property warnings
ar13pit Apr 6, 2019
ff3f6ad
ignore kaldimarshal files
ar13pit Apr 6, 2019
d672892
Revert "fix duplicate property warnings"
ar13pit Apr 6, 2019
84b785b
added kaldi tools to PATH
ar13pit Apr 7, 2019
568812a
improved syntax of exports
ar13pit Apr 7, 2019
5da5944
Merge pull request #5 from tue-robotics/ar13pit/install-update
ar13pit Apr 7, 2019
dfc5229
Merge branch 'master' into develop
ar13pit Nov 5, 2019
fa1ec16
Merge branch 'master' into develop
ar13pit Jan 28, 2020
f1cdd3b
[setup] Removed gstreamer and cleaned up exports
ar13pit Nov 5, 2019
59dd718
[install] Removed build of gstreamer from tue command
ar13pit Nov 19, 2019
1bfe520
[install] Updated usage doc
ar13pit Nov 19, 2019
f748360
feat: Split build function into smaller functions
ar13pit Jan 28, 2020
41868d4
feat: Set higher version of cmake required
ar13pit Jan 28, 2020
d382ff4
feat: Add variables to gather target information
ar13pit Feb 4, 2020
3042f68
feat: Add template for pkgconfig file
ar13pit Feb 4, 2020
6e1daed
feat: Add missing install step for cmake
ar13pit Feb 4, 2020
89fdf0d
feat: Add meta commands to populate GENERATED_LIBS and ALL_TARGETS
ar13pit Feb 4, 2020
df652fe
feat: Add generation of pkgconfig file
ar13pit Feb 4, 2020
7e3439d
feat: Add install step for pkgconfig file
ar13pit Feb 4, 2020
15e963c
feat: Add fst lib and specify include dir paths
ar13pit Mar 7, 2020
b17a3cf
feat: Add PKG_CONFIG_PATH to setup and comment out the rest
ar13pit Mar 7, 2020
8dd8e4f
feat: Remove executable flag
ar13pit Mar 7, 2020
afae1ef
style: Remove extra spaces
ar13pit Mar 7, 2020
b015818
refactor: Add cmake based installation and add pkgconfig file (#6)
ar13pit Mar 7, 2020
05ddf43
fix: Add STATUS file
ar13pit Mar 7, 2020
22d76be
fix: Ignore kaldi-itf from list of shared libs
ar13pit Mar 7, 2020
b8b9c29
feat: Move install check file inside the function
ar13pit Mar 7, 2020
bace887
fix: Minor fixes to installation (#7)
ar13pit Mar 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# dockerignore file to minimalize the size of docker image
#
# Ignore .git and dev directories
/**

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
!/src/*/Makefile
!/src/*/README

# TechUnited begin
/log/
/src/gst-plugin/kaldimarshal.cc
/src/gst-plugin/kaldimarshal.h
# TechUnited end

# Compiled Object files and python ciles
*.slo
*.lo
Expand Down
22 changes: 21 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.12)
project(kaldi)

set(GENERATED_LIBS "" CACHE INTERNAL "")
set(ALL_TARGETS "" CACHE INTERNAL "")

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake;${CMAKE_MODULE_PATH}")
include(GNUInstallDirs)
include(Utils)
Expand Down Expand Up @@ -220,6 +223,20 @@ configure_package_config_file(
${CMAKE_BINARY_DIR}/cmake/kaldi-config.cmake
INSTALL_DESTINATION lib/cmake/kaldi
)

message(STATUS "The list of generated libraries is: ${GENERATED_LIBS}")
set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")

foreach(LIB ${GENERATED_LIBS})
set(PRIVATE_LIBS "${PRIVATE_LIBS} -l${LIB}")
endforeach()

configure_package_config_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/kaldi.pc.in
${CMAKE_BINARY_DIR}/pkgconfig/kaldi.pc
INSTALL_DESTINATION lib/pkgconfig
)

write_basic_package_version_file(
${CMAKE_BINARY_DIR}/cmake/kaldi-config-version.cmake
VERSION ${KALDI_VERSION}
Expand All @@ -228,4 +245,7 @@ write_basic_package_version_file(
install(FILES ${CMAKE_BINARY_DIR}/cmake/kaldi-config.cmake ${CMAKE_BINARY_DIR}/cmake/kaldi-config-version.cmake
DESTINATION lib/cmake/kaldi
)

install(FILES ${CMAKE_BINARY_DIR}/pkgconfig/kaldi.pc DESTINATION lib/pkgconfig)

install(EXPORT kaldi-targets DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/kaldi)
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# -----------------------------------------------------------------------------
# Dockerfile to build Kaldi gstreamer server with tue-env
# -----------------------------------------------------------------------------

# Set the base image to Ubuntu with tue-env
FROM tuerobotics/tue-env:master

# Update the image and install basic packages
RUN sudo apt-get update -qq && \
# Make tue-env available to the intermediate image
# This step needs to be executed at every RUN step
source ~/.bashrc && \
# Install kaldi
tue-get install kaldi

File renamed without changes.
16 changes: 16 additions & 0 deletions cmake/gen_cmake_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,20 @@ def add_test_source(self, filename):

def gen_code(self):
ret = []
ret.append('set(ALL_TARGETS ${ALL_TARGETS} ' + '{} CACHE INTERNAL "ALL_TARGETS")'.format(self.target_name))
if len(self.header_list) > 0:
ret.append("set(PUBLIC_HEADERS")
for f in self.header_list:
ret.append(" " + f)
ret.append(")\n")

if self.target_name != 'kaldi-itf':
ret.append('if (GENERATED_LIBS STREQUAL "")')
ret.append(' set(GENERATED_LIBS "{}" CACHE INTERNAL "GENERATED_LIBS")'.format(self.target_name))
ret.append('else()')
ret.append(' set(GENERATED_LIBS "${GENERATED_LIBS};' + '{}" CACHE INTERNAL "GENERATED_LIBS")'.format(self.target_name))
ret.append('endif()')

ret.append("add_library(" + self.target_name + " INTERFACE)")
ret.append("target_include_directories(" + self.target_name + " INTERFACE ")
ret.append(" $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>")
Expand Down Expand Up @@ -171,6 +179,7 @@ def load_dependency_from_makefile(self, filename):

def gen_code(self):
ret = []
ret.append('set(ALL_TARGETS ${ALL_TARGETS} ' + '{} CACHE INTERNAL "ALL_TARGETS")'.format(self.target_name))

if len(self.header_list) > 0:
ret.append("set(PUBLIC_HEADERS")
Expand All @@ -188,6 +197,13 @@ def gen_code(self):
ret.append(" )")
ret.append("endif()\n")

if self.target_name != 'kaldi-itf':
ret.append('if (GENERATED_LIBS STREQUAL "")')
ret.append(' set(GENERATED_LIBS "{}" CACHE INTERNAL "GENERATED_LIBS")'.format(self.target_name))
ret.append('else()')
ret.append(' set(GENERATED_LIBS "${GENERATED_LIBS};' + '{}" CACHE INTERNAL "GENERATED_LIBS")'.format(self.target_name))
ret.append('endif()')

ret.append("add_library(" + self.target_name)
for f in self.source_list:
ret.append(" " + f)
Expand Down
9 changes: 9 additions & 0 deletions cmake/kaldi.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
prefix=@DEST_DIR@
libdir=${prefix}/lib
includedir=${prefix}/include

Name: kaldi
Description: Kaldi Speech Recognition Toolkit
Version:@VERSION@
Libs: -L${libdir} -lfst @PRIVATE_LIBS@
Cflags: -I${includedir}/kaldi -I${includedir}/openfst
Loading