|
@@ -0,0 +1,51 @@
|
|
|
+#!/bin/sh /usr/share/dpatch/dpatch-run
|
|
|
+## 901-file-mgc.dpatch by Daniel Baumann <daniel@debian.org>
|
|
|
+##
|
|
|
+## DP: Reverting upstream change of stopping to build plain magic file
|
|
|
+## DP: (Closes: #481247).
|
|
|
+
|
|
|
+@DPATCH@
|
|
|
+
|
|
|
+diff -Naurp file.orig/magic/Makefile.am file/magic/Makefile.am
|
|
|
+--- file.orig/magic/Makefile.am 2008-07-01 18:24:19.000000000 +0200
|
|
|
++++ file/magic/Makefile.am 2008-07-01 18:24:26.000000000 +0200
|
|
|
+@@ -1,7 +1,7 @@
|
|
|
+ MAGIC_FRAGMENT_BASE = Magdir
|
|
|
+ MAGIC_FRAGMENT_DIR = $(top_srcdir)/magic/$(MAGIC_FRAGMENT_BASE)
|
|
|
+
|
|
|
+-pkgdata_DATA = magic.mgc
|
|
|
++pkgdata_DATA = magic.mgc magic
|
|
|
+
|
|
|
+ EXTRA_DIST = Header Localstuff \
|
|
|
+ $(MAGIC_FRAGMENT_DIR)/acorn \
|
|
|
+@@ -210,8 +210,20 @@ $(MAGIC_FRAGMENT_DIR)/xwindows \
|
|
|
+ $(MAGIC_FRAGMENT_DIR)/zilog \
|
|
|
+ $(MAGIC_FRAGMENT_DIR)/zyxel
|
|
|
+
|
|
|
++RAW = magic
|
|
|
+ MAGIC = magic.mgc
|
|
|
+-CLEANFILES = ${MAGIC}
|
|
|
++CLEANFILES = ${MAGIC} ${RAW}
|
|
|
++
|
|
|
++${RAW}: Header Localstuff $(EXTRA_DIST)
|
|
|
++ cat /dev/null > $@
|
|
|
++ for frag in $(EXTRA_DIST); do \
|
|
|
++ if test -f $(srcdir)/$$frag; then \
|
|
|
++ f=$(srcdir)/$$frag; \
|
|
|
++ else \
|
|
|
++ f=$$frag; \
|
|
|
++ fi; \
|
|
|
++ cat $$f; \
|
|
|
++ done >> $@
|
|
|
+
|
|
|
+ # FIXME: Build file natively as well so that it can be used to compile
|
|
|
+ # the target's magic file
|
|
|
+@@ -221,6 +233,5 @@ else
|
|
|
+ FILE_COMPILE = $(top_builddir)/src/file
|
|
|
+ endif
|
|
|
+
|
|
|
+-${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE)
|
|
|
+- $(FILE_COMPILE) -C -m $(MAGIC_FRAGMENT_DIR)
|
|
|
+- @mv $(MAGIC_FRAGMENT_BASE).mgc $@
|
|
|
++${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE) $(RAW)
|
|
|
++ $(FILE_COMPILE) -C -m $(RAW)
|