Ensure pristine source after the "clean" target
[fmit.git] / debian / rules
1 #!/usr/bin/make -f
2
3 # Disable Alsa on non-Linux architectures
4 ifneq (,$(findstring $(DEB_HOST_ARCH_OS), kfreebsd hurd))
5         DEB_CONFIGURE_ALSA = --disable-alsa
6 else
7         DEB_CONFIGURE_ALSA = --enable-alsa
8 endif
9
10 %:
11         dh $@
12
13 override_dh_auto_configure:
14         dh_auto_configure -- --with-Qt-dir=/usr/share/qt3 $(DEB_CONFIGURE_ALSA)
15
16 override_dh_auto_build:
17         # This file gets regenerated.  Make sure we can end up with the
18         # original copy of it in place after the clean target.
19         [ -f tr/fmit_fr.ts.orig ] || cp tr/fmit_fr.ts tr/fmit_fr.ts.orig
20         dh_auto_build
21
22 override_dh_auto_clean:
23         dh_auto_clean
24         # Restore the original version of the regenerated .ts file
25         [ -f tr/fmit_fr.ts.orig ] && mv tr/fmit_fr.ts{.orig,} || true