File debian.rules of Package moose

#!/usr/bin/make -f

%:
	dh "$@" --with python2

override_dh_auto_clean:
	rm -rf $(BUILD_DIR_MOOSE)
	dh_auto_clean --buildsystem=cmake

override_dh_auto_configure:
	mkdir -p _build && cd _build && cmake \
	    -DWITH_MOOGLI=OFF \
            -Wno-dev \
            -DVERSION_MOOSE=3.1.4 \
	    -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr \
	    ..

override_dh_auto_build:
	cd _build && make VERBOSE=0 -j`nproc`

override_dh_auto_install:
	cd _build && make install
	# Bug fix of debian. It installs in /usr/local
	if [ -d debian/tmp/usr/local ]; then \
            cp -r debian/tmp/usr/local/* debian/tmp/usr/ ; \
            rm -rf debian/tmp/usr/local ; \
        fi; 
	# Overwrite old moose script.
	echo "#!/bin/sh\n" > debian/tmp/usr/bin/moosegui
	echo "cd /usr/lib/moose/gui/ && python mgui.py" >> debian/tmp/usr/bin/moosegui
	cat debian/tmp/usr/bin/moosegui
	chmod +x debian/tmp/usr/bin/moosegui

override_dh_shlibdeps:
	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info

override_dh_python2:
	dh_python2 --no-guessing-versions
openSUSE Build Service is sponsored by