forked from DEGoodmanWilson/conan-inja
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
30 lines (24 loc) · 1001 Bytes
/
conanfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake, tools
import os
class InjaConan(ConanFile):
name = "inja"
version = "1.0.0"
url = "https://github.com/DEGoodmanWilson/conan-inja"
description = "A C++ library for handling JWT tokens"
license = "https://github.com/pantor/inja/blob/master/LICENSE"
no_copy_source = True
build_policy = "always"
requires = "jsonformoderncpp/[~= 3.1]@vthiery/stable"
def source(self):
source_url = "https://github.com/pantor/inja"
tools.get("{0}/archive/v{1}.tar.gz".format(source_url, self.version))
extracted_dir = self.name + "-" + self.version
os.rename(extracted_dir, "sources")
#Rename to "sources" is a convention to simplify later steps
def package_id(self):
self.info.header_only()
def package(self):
self.copy(pattern="LICENSE")
self.copy(pattern="*.[i|h]pp", dst="include/inja", src="sources/src", keep_path=True)