Update packaging for new upstream version
[fmit.git] / debian / rules
index d0b7def..7a2162a 100755 (executable)
@@ -1,14 +1,25 @@
 #!/usr/bin/make -f
 
 # Disable Alsa on non-Linux architectures
-ifneq (,$(findstring $(DEB_HOST_ARCH_OS), kfreebsd hurd))
-       DEB_CONFIGURE_ALSA = --disable-alsa
+ifneq (linux,$(DEB_HOST_ARCH_OS))
+       DEB_CONFIGURE_ALSA = -DSOUNDSYSTEM_USE_ALSA=OFF
 else
-       DEB_CONFIGURE_ALSA = --enable-alsa
+       DEB_CONFIGURE_ALSA = -DSOUNDSYSTEM_USE_ALSA=ON
 endif
 
 %:
        dh $@
 
 override_dh_auto_configure:
-       dh_auto_configure -- --with-Qt-dir=/usr/share/qt3 $(DEB_CONFIGURE_ALSA)
+       dh_auto_configure -- $(DEB_CONFIGURE_ALSA)
+
+override_dh_auto_build:
+       # This file gets regenerated.  Make sure we can end up with the
+       # original copy of it in place after the clean target.
+       [ -f tr/fmit_fr.ts.orig ] || cp tr/fmit_fr.ts tr/fmit_fr.ts.orig
+       dh_auto_build
+
+override_dh_auto_clean:
+       dh_auto_clean
+       # Restore the original version of the regenerated .ts file
+       [ -f tr/fmit_fr.ts.orig ] && mv tr/fmit_fr.ts{.orig,} || true