From 528edf8db2e813b8f325539422c7d1129318e4d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20P=C3=B6ppel?= <jpoeppel@techfak.uni-bielefeld.de>
Date: Thu, 12 Sep 2019 18:45:45 +0200
Subject: [PATCH] rewrote ipaaca build recipe to hopefully align protobuf
 versions between cpp and python

---
 conda.recipe/build.sh                         |  2 +
 conda.recipe/cpp/meta.yaml                    | 29 -----------
 conda.recipe/{cpp/build.sh => install_cpp.sh} |  2 +
 .../{python/build.sh => install_python.sh}    |  0
 conda.recipe/meta.yaml                        | 52 +++++++++++++++----
 conda.recipe/python/meta.yaml                 | 29 -----------
 6 files changed, 46 insertions(+), 68 deletions(-)
 create mode 100644 conda.recipe/build.sh
 delete mode 100644 conda.recipe/cpp/meta.yaml
 rename conda.recipe/{cpp/build.sh => install_cpp.sh} (95%)
 rename conda.recipe/{python/build.sh => install_python.sh} (100%)
 delete mode 100644 conda.recipe/python/meta.yaml

diff --git a/conda.recipe/build.sh b/conda.recipe/build.sh
new file mode 100644
index 0000000..5f015dd
--- /dev/null
+++ b/conda.recipe/build.sh
@@ -0,0 +1,2 @@
+# build protobuf files
+echo 0
\ No newline at end of file
diff --git a/conda.recipe/cpp/meta.yaml b/conda.recipe/cpp/meta.yaml
deleted file mode 100644
index 993ae6d..0000000
--- a/conda.recipe/cpp/meta.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-package:
-  name: ipaaca-cpp
-  version: "0.1.0"
-
-source:
-  - path: ../../ipaacalib/cpp/
-    folder: ipaaca-cpp
-  - path: ../../ipaacalib/proto/
-    folder: proto
-
-build:
-  number: 1
-
-requirements:
-  build:
-    - {{ compiler('cxx') }} 7.3 # [linux]
-    - cmake >=3.10
-
-  host:
-    - libprotobuf
-    - mosquitto
-    - libboost
-#    - openssl 1.0.*
-
-  run:
-    - mosquitto
-    - libprotobuf
-    - libboost
-#    - openssl 1.0.*
diff --git a/conda.recipe/cpp/build.sh b/conda.recipe/install_cpp.sh
similarity index 95%
rename from conda.recipe/cpp/build.sh
rename to conda.recipe/install_cpp.sh
index 5b6408e..e4c39c8 100644
--- a/conda.recipe/cpp/build.sh
+++ b/conda.recipe/install_cpp.sh
@@ -1,4 +1,6 @@
 #!/bin/bash
+echo "Installing ipaaca-cpp"
+
 
 INCLUDE_PATH="${PREFIX}/include"
 LIBRARY_PATH="${PREFIX}/lib"
diff --git a/conda.recipe/python/build.sh b/conda.recipe/install_python.sh
similarity index 100%
rename from conda.recipe/python/build.sh
rename to conda.recipe/install_python.sh
diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml
index 70b896d..c1ffb42 100644
--- a/conda.recipe/meta.yaml
+++ b/conda.recipe/meta.yaml
@@ -2,21 +2,53 @@ package:
   name: ipaaca
   version: "0.1.0"
 
-# source:
-#   - path: ../ipaacalib/cpp/
-#     folder: ipaaca-cpp
-#   - path: ../ipaacalib/python/
-#     folder: ipaaca-py
-#   - path: ../ipaacalib/proto/
-#     folder: proto
+source:
+  - path: ../ipaacalib/cpp/
+    folder: ipaaca-cpp
+  - path: ../ipaacalib/python/
+    folder: ipaaca-py
+  - path: ../ipaacalib/proto/
+    folder: proto
 
 build:
   number: 1
 
-run:
-  - ipaaca-cpp
-  - ipaaca-py
+requirements:
+  build:
+    - {{ compiler('cxx') }} 7.3 # [linux]
+    - cmake >=3.10
+  run:
+    - ipaaca-cpp
+    - ipaaca-py
 
+outputs:
+  - name: ipaaca-cpp
+    script: install_cpp.sh
+    requirements:
+      host:
+        - libprotobuf
+        - mosquitto
+        - libboost
+
+      run:
+        - mosquitto
+        - libprotobuf
+        - libboost
+  - name: ipaaca-py
+    script: install_python.sh
+    requirements:
+      host:
+        - python
+        - pip
+        - setuptools
+        - protobuf
+
+      run:
+        - python
+        - mosquitto
+        - paho-mqtt
+        - protobuf
+    
 # requirements:
 #   build:
 #     - {{ compiler('cxx') }} 7.3 # [linux]
diff --git a/conda.recipe/python/meta.yaml b/conda.recipe/python/meta.yaml
deleted file mode 100644
index 3f05568..0000000
--- a/conda.recipe/python/meta.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-package:
-  name: ipaaca-py
-  version: "0.1.0"
-
-source:
-  - path: ../../ipaacalib/python
-    folder: ipaaca-py
-  - path: ../../ipaacalib/proto
-    folder: proto
-
-build:
-  noarch: python
-  number: 1
-#  script: "{{ PYTHON }} -m pip install ipaaca-py/ -vv"
-  
-
-requirements:
-  build:
-    - python
-    - pip
-    - setuptools
-    - protobuf
-
-  run:
-    - python
-    - mosquitto
-    - paho-mqtt
-    - protobuf
-
-- 
GitLab