Ensure pristine source after the "clean" target
[fmit.git] / debian / rules
index d0b7def..c7ce458 100755 (executable)
@@ -12,3 +12,14 @@ endif
 
 override_dh_auto_configure:
        dh_auto_configure -- --with-Qt-dir=/usr/share/qt3 $(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