[caffe-contrib] 250/362: debian/bin: add script for generating *.in templates
Zhou Mo
cdluminate-guest at moszumanska.debian.org
Tue May 3 09:24:39 UTC 2016
This is an automated email from the git hooks/post-receive script.
cdluminate-guest pushed a commit to branch master
in repository caffe-contrib.
commit 7f5629bf72c23da0e388252c4912d2db51c3f8e2
Author: Zhou Mo <cdluminate at gmail.com>
Date: Sun Dec 13 07:10:02 2015 +0000
debian/bin: add script for generating *.in templates
---
debian/bin/generate-templates_stage1.sh | 118 ++++++++++++++++++++++++++++++++
1 file changed, 118 insertions(+)
diff --git a/debian/bin/generate-templates_stage1.sh b/debian/bin/generate-templates_stage1.sh
new file mode 100755
index 0000000..986189b
--- /dev/null
+++ b/debian/bin/generate-templates_stage1.sh
@@ -0,0 +1,118 @@
+#!/bin/sh
+# Zhou Mo <cdluminate at gmail.com>
+set -e
+
+# template file
+export _template="./install_template"
+
+## [caffe-cpu] && [caffe-cuda]
+# generate caffe-cpu.install and caffe-cuda.install
+printf "I: [caffe-cpu] Caffe ELFs ...\n"
+cat $_template | grep caffe_cpu/bin | \
+ tee caffe-cpu.install.in
+printf "I: [caffe-cuda] Caffe ELFs ...\n"
+cat $_template | grep caffe_cuda/bin | \
+ tee caffe-cuda.install.in
+# [FIXME] generate caffe-*.manpages
+printf "I: [caffe-cpu] man \n"
+cat > caffe-cpu.manpages << EOF
+debian/man/caffe.1
+debian/man/classification.1
+debian/man/compute_image_mean.1
+debian/man/convert_cifar_data.1
+debian/man/convert_imageset.1
+debian/man/convert_mnist_data.1
+debian/man/convert_mnist_siamese_data.1
+debian/man/extract_features.1
+debian/man/upgrade_net_proto_binary.1
+debian/man/upgrade_net_proto_text.1
+EOF
+printf "I: [caffe-cuda] man \n"
+cat > caffe-cuda.manpages << EOF
+debian/man/caffe.1
+debian/man/classification.1
+debian/man/compute_image_mean.1
+debian/man/convert_cifar_data.1
+debian/man/convert_imageset.1
+debian/man/convert_mnist_data.1
+debian/man/convert_mnist_siamese_data.1
+debian/man/extract_features.1
+debian/man/upgrade_net_proto_binary.1
+debian/man/upgrade_net_proto_text.1
+EOF
+
+## [libcaffe-cpu] && [libcaffe-cuda]
+# generate libcaffe-cpu0.install and libcaffe-cuda0.install
+printf "I: [libcaffe-cpu0] libcaffe.so ...\n"
+cat $_template | grep caffe_cpu/lib/libcaffe.so.0 | \
+ tee libcaffe-cpu0.install.in
+printf "I: [libcaffe-cuda0] libcaffe.so ...\n"
+cat $_template | grep caffe_cuda/lib/libcaffe.so.0 | \
+ tee libcaffe-cuda0.install.in
+
+## [libcaffe-*-dev]
+# generate libcaffe-cpu-dev.install and libcaffe-cuda-dev.install
+printf "I: [libcaffe-cpu-dev] headers ...\n"
+cat $_template | grep caffe_cpu/include | \
+ tee libcaffe-cpu-dev.install.in
+printf " [libcaffe-cpu-dev] static lib ...\n"
+cat $_template | grep caffe_cpu/lib/libproto.a | \
+ tee -a libcaffe-cpu-dev.install.in
+printf " [libcaffe-cpu-dev] cmake files ...\n"
+cat $_template | grep caffe_cpu/share/Caffe | \
+ tee -a libcaffe-cpu-dev.install.in
+cat > libcaffe-cpu-dev.links << EOF
+usr/lib/libcaffe.so.0 usr/lib/libcaffe.so
+EOF
+printf "I: [libcaffe-cuda-dev] headers ...\n"
+cat $_template | grep caffe_cuda/include | \
+ tee libcaffe-cuda-dev.install.in
+printf " [libcaffe-cuda-dev] static lib ...\n"
+cat $_template | grep caffe_cuda/lib/libproto.a | \
+ tee -a libcaffe-cuda-dev.install.in
+printf " [libcaffe-cuda-dev] cmake files ...\n"
+cat $_template | grep caffe_cuda/share/Caffe | \
+ tee -a libcaffe-cuda-dev.install.in
+cat > libcaffe-cpu-dev.links << EOF
+usr/lib/libcaffe.so.0 usr/lib/libcaffe.so
+EOF
+
+## [python-caffe-*]
+# generate python-caffe-cpu.install
+printf "I: [python-caffe-cpu] python package ...\n"
+cat $_template | grep caffe_cpu/python/caffe | \
+ tee python-caffe-cpu.install.in
+# generate python-caffe-cpu.examples
+printf "I: [python-caffe-cpu] examples ...\n"
+cat $_template | grep caffe_cpu/python | \
+ grep -v caffe_cpu/python/caffe | grep "py$" | \
+ tee python-caffe-cpu.examples.in
+# generate python-caffe-cpu.docs
+printf "I: [python-caffe-cpu] requirements ...\n"
+cat $_template | grep caffe_cpu/python/req* | \
+ tee python-caffe-cpu.docs.in
+
+cat > python-caffe-cpu.links << EOF
+usr/lib/python2.7/dist-packages/caffe/_caffe.so.0 usr/lib/python2.7/dist-packages/caffe/_caffe.so
+EOF
+
+# generate python-caffe-cuda.install
+printf "I: [python-caffe-cuda] python package ...\n"
+cat $_template | grep caffe_cuda/python/caffe | \
+ tee python-caffe-cuda.install.in
+# generate python-caffe-cuda.examples
+printf "I: [python-caffe-cuda] examples ...\n"
+cat $_template | grep caffe_cuda/python | \
+ grep -v caffe_cuda/python/caffe | grep "py$" | \
+ tee python-caffe-cuda.examples.in
+# generate python-caffe-cuda.docs
+printf "I: [python-caffe-cuda] requirements ...\n"
+cat $_template | grep caffe_cuda/python/req* | \
+ tee python-caffe-cuda.docs.in
+
+cat > python-caffe-cuda.links << EOF
+usr/lib/python2.7/dist-packages/caffe/_caffe.so.0 usr/lib/python2.7/dist-packages/caffe/_caffe.so
+EOF
+
+# END generating templates
+unset _template
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/caffe-contrib.git
More information about the debian-science-commits
mailing list