Skip to content

Commit

Permalink
package and setup.py improvements, and --audio-track and --video-track
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin Beatty committed Dec 21, 2012
1 parent c24f0f4 commit 4f04dbd
Show file tree
Hide file tree
Showing 11 changed files with 635 additions and 616 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
build
mkvtomp4-*-doc.zip
VERSION
mkvtomp4
setup.py
dist
simplemkv/version.py
14 changes: 14 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MANIFEST
setup.py
LICENSE
README.md
Makefile
man2txt.mk
mkvtomp4.py
simplemkv/__init__.py
simplemkv/version.py
simplemkv/info.py
simplemkv/tomp4.py
doc/mkvtomp4.1
doc/mkvtomp4.1.html
doc/mkvtomp4.txt
58 changes: 14 additions & 44 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,68 +1,38 @@
prefix=/usr/local
TMPDIR=/tmp

RM = rm -f
A2X = a2x
ASCIIDOC = asciidoc
INSTALL = install
SED = sed
RSYNC = rsync

default: all
.PHONY: all
default: doc
.PHONY: default

PROJECT = mkvtomp4
include gen-version.mk
include dist.mk
include man2txt.mk

all: bin doc
bin: $(PROJECT)
doc: doc/$(PROJECT).1 doc/$(PROJECT).1.html doc/$(PROJECT).txt
clean: clean-bin clean-doc
.PHONY: all bin doc clean

$(PROJECT): $(PROJECT).py $(VERSION_DEP)
$(SED) -e "s/^__version__ = .*/__version__ = '$(VERSION)'/" \
$(PROJECT).py > $(PROJECT)
@chmod +x $(PROJECT)
clean-bin:
$(RM) $(PROJECT)
install-bin:
@echo 'make install-doc to install documentation.'
@echo 'To install the script, see README.markdown.'
install: install-bin
.PHONY: clean-bin install install-bin
.PHONY: doc

doc/$(PROJECT).1: doc/$(PROJECT).1.txt
$(A2X) -f manpage -L doc/$(PROJECT).1.txt
doc/$(PROJECT).1.html: doc/$(PROJECT).1.txt
$(ASCIIDOC) doc/$(PROJECT).1.txt
doc/$(PROJECT).txt: doc/$(PROJECT).1
$(call man2txt,doc/$(PROJECT).1,doc/$(PROJECT).txt)
clean-doc:
clean:
$(RM) doc/$(PROJECT).1 doc/$(PROJECT).1.html doc/$(PROJECT).txt
install-doc: doc/$(PROJECT).1 doc/$(PROJECT).1.html
$(INSTALL) -d -m 0755 $(DESTDIR)$(prefix)/share/man/man1
$(INSTALL) -m 0644 doc/$(PROJECT).1 $(DESTDIR)$(prefix)/share/man/man1
$(INSTALL) -m 0644 doc/$(PROJECT).1.html $(DESTDIR)$(prefix)/share/man/man1
$(INSTALL) -d -m 0755 $(DESTDIR)$(prefix)/share/doc/$(PROJECT)
$(INSTALL) -m 0644 README.markdown $(DESTDIR)$(prefix)/share/doc/$(PROJECT)
$(INSTALL) -m 0644 LICENSE $(DESTDIR)$(prefix)/share/doc/$(PROJECT)
easy_install_doc: doc/$(PROJECT).1 doc/$(PROJECT).1.html doc/$(PROJECT).1.txt
@$(RM) $(DISTNAME)-doc.zip
@mkdir -p $(DISTNAME)-doc
@$(INSTALL) -m 0644 doc/$(PROJECT).1.html $(DISTNAME)-doc/index.html
$(ZIP) $(DISTNAME)-doc.zip $(DISTNAME)-doc/index.html >/dev/null
@$(RM) -r $(DISTNAME)-doc
.PHONY: clean-doc install-doc easy_install_doc

upload-html: doc/$(PROJECT).1.html
$(RSYNC) -av --chmod u=rw,g=r,o=r doc/$(PROJECT).1.html stokes:~/www/
.PHONY: upload-html
.PHONY: clean
#easy_install_doc: doc/$(PROJECT).1 doc/$(PROJECT).1.html doc/$(PROJECT).1.txt
# @$(RM) $(DISTNAME)-doc.zip
# @mkdir -p $(DISTNAME)-doc
# @$(INSTALL) -m 0644 doc/$(PROJECT).1.html $(DISTNAME)-doc/index.html
# $(ZIP) $(DISTNAME)-doc.zip $(DISTNAME)-doc/index.html >/dev/null
# @$(RM) -r $(DISTNAME)-doc
#.PHONY: easy_install_doc

pep8:
pep8 mkvtomp4.py
@find . -name '*.py' -print0 | xargs -0 pep8
pyflakes:
pyflakes mkvtomp4.py
@find . -name '*.py' -print0 | xargs -0 pyflakes
.PHONY: pep8 pyflakes
41 changes: 0 additions & 41 deletions dist.mk

This file was deleted.

26 changes: 0 additions & 26 deletions gen-version.mk

This file was deleted.

33 changes: 0 additions & 33 deletions gen-version.sh

This file was deleted.

Loading

0 comments on commit 4f04dbd

Please sign in to comment.