summaryrefslogtreecommitdiffstats
path: root/modules/nasb1995/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nasb1995/Makefile')
-rw-r--r--modules/nasb1995/Makefile69
1 files changed, 69 insertions, 0 deletions
diff --git a/modules/nasb1995/Makefile b/modules/nasb1995/Makefile
new file mode 100644
index 0000000..e52a082
--- /dev/null
+++ b/modules/nasb1995/Makefile
@@ -0,0 +1,69 @@
+#SRC_ZIP_PATH=pristine-private/nasb/historical/nasb.zip
+SRC_ZIP_PATH=pristine-private/nasb/nasb_1995_full_06-15-21.zip
+MODNAME=NASB1995
+MODNAMEPATHSEG=nasb1995
+REPO=lockman
+
+SRCNAME=nasb\ 1995\ master\ nocode.txt
+NOTESNAME=nasb\ 1995\ master\ notes\ nocode.txt
+
+all: $(MODNAME).zip
+
+$(MODNAME).zip: modules/texts/ztext/$(MODNAMEPATHSEG)/ot.bzv
+ zip -r $(MODNAME).zip mods.d modules
+
+modules/texts/ztext/$(MODNAMEPATHSEG)/ot.bzv: combined.osis.xml
+ mkdir -p modules/texts/ztext/$(MODNAMEPATHSEG)
+ osis2mod modules/texts/ztext/$(MODNAMEPATHSEG)/ combined.osis.xml -z z -b 4
+ chmod a+r modules/texts/ztext/$(MODNAMEPATHSEG)/*
+
+combined.osis.xml: src.txt lockosis
+ ./lockosis src.txt notes.txt 2> combined.osis.err > out.xml
+ xmllint out.xml 2> lint.err > /dev/null
+ mv out.xml combined.osis.xml
+
+tmp/$(SRCNAME): src.zip
+ mkdir -p tmp
+ cd tmp && unzip -uD ../src.zip
+ cd tmp && touch *
+
+src.txt: tmp/$(SRCNAME)
+ cd tmp && sed -f ../srcfixes.sed $(SRCNAME) > src-patched.txt
+ cd tmp && cp src-patched.txt ../src.txt
+ cd tmp && cp $(NOTESNAME) ../notes.txt
+
+src.zip:
+ scp host.crosswire.org:~swordmod/${SRC_ZIP_PATH} src.zip
+
+$(MODNAME)_previous.zip:
+ wget "https://crosswire.org/ftpmirror/pub/sword/lockmanpackages/$(MODNAME).zip" -O $(MODNAME)_previous.zip
+
+tmp/$(MODNAME)_previous.imp: $(MODNAME)_previous.zip generalchanges.sed
+ cd tmp && rm -rf mods.d modules
+ cd tmp && unzip -uD ../$(MODNAME)_previous.zip
+ cd tmp && mod2imp $(MODNAME) > $(MODNAME)_previous_raw.imp
+ cd tmp && sed -f ../generalchanges.sed -i $(MODNAME)_previous_raw.imp
+ cd tmp && sed 's/\([^^]\)\(<[^/]\)/\1\n\2/g' $(MODNAME)_previous_raw.imp > $(MODNAME)_previous.imp
+
+tmp/$(MODNAME).imp: $(MODNAME).zip
+ cd tmp && rm -rf mods.d modules
+ cd tmp && unzip -uD ../$(MODNAME).zip
+ cd tmp && mod2imp $(MODNAME) > $(MODNAME)_raw.imp
+ cd tmp && sed -f ../generalchanges.sed -i $(MODNAME)_raw.imp
+ cd tmp && sed 's/\([^^]\)\(<[^/]\)/\1\n\2/g' $(MODNAME)_raw.imp > $(MODNAME).imp
+
+diff: tmp/$(MODNAME).imp tmp/$(MODNAME)_previous.imp
+ diff -Pu tmp/$(MODNAME)_previous.imp tmp/$(MODNAME).imp > diff; [ $$? -lt 2 ]
+
+deploy: $(MODNAME).zip
+ scp $(MODNAME).zip host.crosswire.org:/home/ftp/pub/sword/$(REPO)/
+
+clean:
+ rm -rf combined.osis.* *.o lockosis modules $(MODNAME).zip notes.txt src.txt tmp diff lint.err
+
+distclean: clean
+ rm -rf src.zip NASB_previous.zip
+
+.cpp:
+ g++ -O0 -g -DHAVESWORD -Wall -Werror `pkg-config --cflags sword` $< -o $@ `pkg-config --libs sword`
+