Merge tag '2.3.2+dfsg3-10' into master
[alioth/musescore.git] / debian / rules
index 5c94f40..b710c2a 100755 (executable)
@@ -16,11 +16,11 @@ export TZ
 shellescape='$(subst ','\'',$(1))'
 shellexport=$(1)=$(call shellescape,${$(1)})
 
-MSPPKG=musescore
+MSPPKG=musescore3
 MSCPKG=${MSPPKG}-common
 MSPDIR=debian/${MSPPKG}
 MSCDIR=debian/${MSCPKG}
-MSHARE=usr/share/mscore-*
+MSHARE=usr/share/mscore3-*
 
 DEB_HOST_ARCH?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
 DEB_HOST_ARCH_OS?=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
@@ -72,12 +72,17 @@ CMAKE_DEFS:=        -DCMAKE_SKIP_RPATH=ON
 CMAKE_DEFS+=   -DDOWNLOAD_SOUNDFONT=OFF
 CMAKE_DEFS+=   -DUSE_SYSTEM_FREETYPE=ON \
                -DFREETYPE_INCLUDE_DIRS=/usr/include/freetype2/
-CMAKE_DEFS+=   -DBUILD_WEBKIT=OFF
+CMAKE_DEFS+=   -DBUILD_WEBENGINE=OFF
+CMAKE_DEFS+=   -DOMR=ON
+CMAKE_DEFS+=   -DUSE_SYSTEM_POPPLER=ON
+CMAKE_DEFS+=   -DBUILD_CRASH_REPORTER=OFF
 
 ifneq (linux,${DEB_HOST_ARCH_OS})
 CMAKE_DEFS+=   -DBUILD_PORTMIDI=OFF
 endif
 
+CMAKE_DEFS+=   -DMSCORE_INSTALL_SUFFIX="3"
+
 override_dh_auto_configure:
        rm -rf debian/q-include
        mkdir debian/q-include
@@ -92,15 +97,26 @@ override_dh_auto_configure:
 override_dh_auto_build:
        env GNUMAKEFLAGS="$$GNUMAKEFLAGS --output-sync" \
            dh_auto_build -- lrelease all
+       doxygen Doxyfile.plugins
 
 override_dh_auto_test:
        exec mksh debian/buildtest ${DEB_BUILD_OPTIONS}
 
 execute_after_dh_install-indep:
+       # add doxygen-generated files
+       cd doc && exec cp -r plugins ../${MSCDIR}/${MSHARE}/manual/
+       dh_doxygen -p${MSCPKG} $$(cd ${MSCDIR} && \
+           echo ${MSHARE}/manual/plugins/html)
+       # doc-base insists on /usr/share/doc/ prefix
+       mkdir -p ${MSCDIR}/usr/share/doc/${MSCPKG}
+       ln -sfTr ${MSCDIR}/${MSHARE}/manual/plugins \
+           ${MSCDIR}/usr/share/doc/${MSCPKG}/plugin-doxy
        # make system-wide soundfonts available
        cd ${MSCDIR}/${MSHARE} && mkdir -p sound && \
            ln -sf ../../sounds/sf2 ../../sounds/sf3 ../../sounds/sfz sound/
 
 execute_after_dh_auto_clean:
        rm -rf debian/q-include
+       # remove possible doxygen remnants
+       rm -rf doc/plugins
        -chmod -R g-w . # work around #796257 for Debian reproducible-builds