Skip to content

Commit

Permalink
Merge pull request #5 from jschueller/packages
Browse files Browse the repository at this point in the history
Packages
  • Loading branch information
jschueller committed Jan 27, 2016
2 parents 821d2ee + bbebf23 commit 4b0b9f8
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ install:
script:
- cmake -DCMAKE_INSTALL_PREFIX=~/.local
.
- make install -j2
- make tests -j2
- ctest -j2 --output-on-failure
- make install -j2 && make tests -j2 && ctest -j2 --output-on-failure --timeout 100

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ endif ()

set ( CPACK_PACKAGE_NAME ${PACKAGE_NAME} )
set ( CPACK_PACKAGE_VERSION_MAJOR 0 )
set ( CPACK_PACKAGE_VERSION_MINOR 1h )
set ( CPACK_PACKAGE_VERSION_MINOR 1i )
set ( CPACK_PACKAGE_VERSION_PATCH )
set ( CPACK_SOURCE_GENERATOR "TGZ;TBZ2" )
set ( CPACK_BINARY_STGZ "OFF" )
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1h
0.1i
2 changes: 1 addition & 1 deletion distro/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
otsvm (0.1h-0.1) unstable; urgency=low
otsvm (0.1i-0.1) unstable; urgency=low

* Non-maintainer upload.
* Initial release.
Expand Down
10 changes: 3 additions & 7 deletions distro/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ override_dh_auto_configure: $(PYALL:python%=cmake-configure-%) \

cmake-configure-%:
dh_auto_configure -Bbuild-python$* -- \
-DUSE_SPHINX=OFF \
-DBUILD_DOC=OFF \
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ \
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING='$(cflags)' \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING='$(cxxflags)' \
-DCMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING='$(ldflags)' \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
Expand All @@ -53,10 +51,8 @@ override_dh_auto_install: $(PYALL:python%=cmake-install-%)
cmake-install-%:
dh_auto_install -Bbuild-python$*
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
# CTestTestfile.cmake sets LD_LIBRARY_PATH to find libraries in debian/tmp.
# But it overrides current value, which breaks when run by fakeroot.
[ -z "$$LD_LIBRARY_PATH" ] || sed -i -e "s#;LD_LIBRARY_PATH=[^;]*#&:$$LD_LIBRARY_PATH#" build-python$*/python/test/CTestTestfile.cmake
CTEST_OUTPUT_ON_FAILURE=1 \
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$${LD_LIBRARY_PATH}:}$(CURDIR)/debian/otsvm/usr/lib \
CTEST_OUTPUT_ON_FAILURE=1 \
$(MAKE) $(test_makeflags) -C build-python$* test ARGS="$(test_makeflags) -R pyinstallcheck"
find $(CURDIR)/debian/otsvm -name "*.pyc" -o -name "__pycache__" | xargs rm -rf
endif
Expand Down
6 changes: 3 additions & 3 deletions distro/rpm/otsvm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
-DBUILD_SHARED_LIBS:BOOL=ON

Name: otsvm
Version: 0.1h
Version: 0.1i
Release: 0%{?dist}
Summary: OpenTURNS module
Group: System Environment/Libraries
Expand Down Expand Up @@ -72,8 +72,8 @@ Python textual interface to OTSVM uncertainty library
%setup -q

%build
%cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_DESTDIR:PATH=%{buildroot} \
%cmake -DINSTALL_DESTDIR:PATH=%{buildroot} \
-DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON \
-DBUILD_DOC=OFF .
make %{?_smp_mflags}

Expand Down
2 changes: 0 additions & 2 deletions lib/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ if ( MINGW )
endif ()

set ( CHECK_ENVIRONMENT
"LD_LIBRARY_PATH=${INSTALL_DESTDIR}${LIBRARY_PATH}:$ENV{LD_LIBRARY_PATH}"
${ADAPT_CHECK_TESTS_EXPONENT}
)


set ( CHECK_TO_BE_RUN )
macro ( ot_check_test TESTNAME )
set ( TESTNAME_TGT t_${TESTNAME} )
Expand Down
2 changes: 1 addition & 1 deletion python/src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@

from .otsvm import *

__version__ = '0.1h'
__version__ = '0.1i'

2 changes: 1 addition & 1 deletion python/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ endif ()

set ( PYINSTALLCHECK_ENVIRONMENT "AUTOTEST_PATH=${INSTALL_DESTDIR}${EXAMPLE_PATH}"
"OPENTURNS_CONFIG_PATH=${INSTALL_DESTDIR}${SYSCONFIG_PATH}/openturns"
"LD_LIBRARY_PATH=${OPENTURNS_LIBRARY_DIRS}:${INSTALL_DESTDIR}${OTSVM_LIBRARY_PATH}:$ENV{LD_LIBRARY_PATH}"
"PYTHONPATH=${OPENTURNS_PYTHON${PYTHON_VERSION_MAJOR}_MODULE_PATH}${PATH_SEP}${INSTALL_DESTDIR}${PYTHON_MODULE_PATH}${PATH_SEP}$ENV{PYTHONPATH}"
${ADAPT_CHECK_TESTS_EXPONENT}
)


set ( PYINSTALLCHECK_TO_BE_RUN )
macro ( ot_pyinstallcheck_test TESTNAME )
set ( TESTNAME_TGT t_${TESTNAME} )
Expand Down

0 comments on commit 4b0b9f8

Please sign in to comment.