mpg123 のパッケージ化

めんどうなので、キーワードをshにすることにした。
Makefiledebian/rulesにパッチしてビルド。
しかし、途中でエラーになってしまう。
原因はこれ。

debian/rules
	ARCH:=$(shell dpkg --print-gnu-build-architecture)

dpkgにはそんなオプションがないとのたまう。
dpkgのオプションを調べてみると、dpkg-1.4.0.34の頃にはそんなオプションもあったらしい。

 "  dpkg --print-architecture               print target architecture (uses GCC)\n"
 "  dpkg --print-gnu-build-architecture     print GNU version of target arch\n"
 "  dpkg --print-installation-architecture  print host architecture (for inst'n)\n"

dpkg --print-architecture は今もあるな。

# dpkg --print-architecture
sh4

でも、ここで取得しているのは、ARCH なのだから、sh4が返れば十分なわけで、--print-architecture に変更しちゃっても実害はなさそう。
またエラーだ。コンパイルは通ったのだから、あとは何とかしてよ...

dpkg-gencontrol -isp -T"debian/substvars.mpg123-oss" \
        -p"mpg123" -P"debian/tmp.mpg123-oss"
dpkg-gencontrol: error: current build architecture sh4 does not appear in package's list (i386 alpha powerpc m68k arm sparc hppa)
make: *** [binary-pkg-mpg123-oss] Error 255

debian/controlに対応が抜けていたよ... orz

Package: mpg123
Architecture: i386 alpha powerpc m68k arm sparc hppa sh4

通った。
あぢぃ。