gremlin/: Start on making it be a proper built thing.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 13 Feb 2016 19:33:40 +0000 (19:33 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 14 Feb 2016 02:09:39 +0000 (02:09 +0000)
.gitignore
Makefile.am
configure.ac
debian/control
debian/gremlin.install [new file with mode: 0644]
gremlin/Makefile.am [new file with mode: 0644]
gremlin/gremlin.in [moved from gremlin/gremlin with 99% similarity]

index f9d77cc..61708fd 100644 (file)
@@ -4,3 +4,4 @@
 /autom4te.cache/
 /config/
 /configure
+/gremlin/Makefile.in
index 5b4a513..c5cc0b8 100644 (file)
@@ -30,6 +30,8 @@ SUBDIRS                        =
 ###--------------------------------------------------------------------------
 ### Subdirectories.
 
+SUBDIRS                        += gremlin
+
 ###--------------------------------------------------------------------------
 ### Release tweaking.
 
@@ -37,9 +39,6 @@ SUBDIRS                        =
 dist-hook::
        echo $(VERSION) >$(distdir)/RELEASE
 
-## Bodge for now.
-EXTRA_DIST             += gremlin/gremlin
-
 ## Additional build tools.
 EXTRA_DIST             += config/auto-version
 EXTRA_DIST             += config/confsubst
@@ -54,4 +53,6 @@ EXTRA_DIST            += debian/copyright
 EXTRA_DIST             += debian/compat
 EXTRA_DIST             += debian/source/format
 
+EXTRA_DIST             += debian/gremlin.install
+
 ###----- That's all, folks --------------------------------------------------
index 16813ce..b20a56d 100644 (file)
@@ -28,7 +28,7 @@ dnl Initialization.
 
 mdw_AUTO_VERSION
 AC_INIT([autoys], AUTO_VERSION, [mdw@distorted.org.uk])
-AC_CONFIG_SRCDIR([gremlin/gremlin])
+AC_CONFIG_SRCDIR([gremlin/gremlin.in])
 AC_CONFIG_AUX_DIR([config])
 AM_INIT_AUTOMAKE([foreign])
 mdw_SILENT_RULES
@@ -64,7 +64,9 @@ AM_CONDITIONAL([HAVE_BASH], [test $have_bash = yes])
 dnl--------------------------------------------------------------------------
 dnl Output.
 
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES(
+  [Makefile]
+  [gremlin/Makefile])
 AC_OUTPUT
 
 dnl----- That's all, folks --------------------------------------------------
index c1edd5e..9181280 100644 (file)
@@ -8,4 +8,34 @@ Standards-Version: 3.1.1
 Package: autoys
 Architecture: all
 Section: sound
+Depends:
+       gremlin
 Description: A convenience package which depends on the other `autoys' packages.
+
+Package: gremlin
+Architecture: all
+Section: sound
+Depends: ${python:Depends}, 
+       python-pyparsing,
+       python-gst0.10, python-gobject-2,
+       python-eyed3, python-imaging
+Description: Maintain converted trees of audio files.
+ The `gremlin' program converts audio files in an input `master' directory
+ tree, which presumably contains high-quality (ideally lossless) encodings of
+ interesting audio, writing corresponding converted files to a collection of
+ output directory trees.  It's non-interactive, idempotent, and restartable;
+ it never modifies its master tree.  It's exactly the sort of thing you want
+ to install as a daily cron job.
+ .
+ The gremlin reads a configuration file which describes the conversion policy
+ for each of the output trees.  The policy can say things like: copy MP3
+ files up to 160kb/s, or Ogg Vorbis files up to 128kb/s; and convert
+ everything else to 128kb/s Ogg Vorbis.
+ .
+ The gremlin can also convert image files, such as cover art.
+ .
+ Input files can be anything which GStreamer and/or the Python Imaging
+ Library can understand; output files are more constrained, because the
+ gremlin has to be able to understand their relevant properties.  The
+ currently supported audio formats are Ogg Vorbis and MP3; image formats are
+ JPEG, PNG, and BMP.
diff --git a/debian/gremlin.install b/debian/gremlin.install
new file mode 100644 (file)
index 0000000..075f1d0
--- /dev/null
@@ -0,0 +1 @@
+usr/bin/gremlin
diff --git a/gremlin/Makefile.am b/gremlin/Makefile.am
new file mode 100644 (file)
index 0000000..a80ba4a
--- /dev/null
@@ -0,0 +1,44 @@
+### -*-makefile-*-
+###
+### Build script for the conversion gremlin
+###
+### (c) 2016 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the `autoys' audio tools collection.
+###
+### `autoys' is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### `autoys' is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with `autoys'; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+###--------------------------------------------------------------------------
+### The gremlin.
+
+if HAVE_PYTHON
+
+bin_SCRIPTS            += gremlin
+CLEANFILES             += gremlin
+EXTRA_DIST             += gremlin.in
+
+gremlin: gremlin.in
+       $(SUBST) $(srcdir)/gremlin.in >$@.new $(SUBSTITUTIONS) && \
+               chmod +x $@.new && mv $@.new $@
+
+
+endif
+
+###----- That's all, folks --------------------------------------------------
similarity index 99%
rename from gremlin/gremlin
rename to gremlin/gremlin.in
index c9734d5..eded04f 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! @PYTHON@
 ###
 ### Convert a directory tree of audio files
 ###
@@ -63,7 +63,7 @@ import pyparsing as P
 ###--------------------------------------------------------------------------
 ### Special initialization.
 
-VERSION = '1.0.0~pre'
+VERSION = '@VERSION@'
 
 ## GLib.
 G.threads_init()