Codebase list golang-github-rainycape-unidecode / 9c81148
Allow for builing twice Alexandre Viau 8 years ago
2 changed file(s) with 15 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
0 Description: Generate table.go during build
1 Upstream ships with a pre-built table.go file. It is
2 best to build it ourselves.
3 Author: Alexandre Viau <alexandre@alexandreviau.net>
4 Last-Update: 2015-09-04
5
6 --- /dev/null
7 +++ b/generate_table.go
8 @@ -0,0 +1,2 @@
9 +package unidecode
0 --- a/unidecode.go
1 +++ b/unidecode.go
2 @@ -1,6 +1,7 @@
3 // Package unidecode implements a unicode transliterator
4 // which replaces non-ASCII characters with their ASCII
5 // approximations.
106 +//go:generate go run make_table.go
7 package unidecode
8
9 import (
66 SOURCE = $(TMP)/../
77
88 %:
9 dh $@ --buildsystem=golang --with=golang
9 dh $@ --buildsystem=golang --with=golang --builddirectory=_build
1010
11 override_dh_auto_build:
12 # Also install table.txt
13 rm $(SOURCE)/table.go
14 cp $(SOURCE)/table.txt $(CURDIR)/*/src/github.com/rainycape/unidecode/
15 dh_auto_build
11 override_dh_auto_configure:
12 dh_auto_configure
13 # Don't use included table.go + install table.txt
14 rm _build/src/github.com/rainycape/unidecode/table.go
15 cp $(SOURCE)/table.txt _build/src/github.com/rainycape/unidecode/table.txt