2
2
from conans .errors import ConanInvalidConfiguration
3
3
import os
4
4
5
- required_conan_version = ">=1.43 .0"
5
+ required_conan_version = ">=1.33 .0"
6
6
7
7
8
8
class ScdocInstallerConan (ConanFile ):
9
9
name = "scdoc"
10
10
description = "scdoc is a simple man page generator for POSIX systems written in C99."
11
- topics = ("scdoc " , "documentation" )
11
+ topics = ("manpage " , "documentation" , "posix " )
12
12
url = "https://github.com/conan-io/conan-center-index"
13
13
homepage = "https://git.sr.ht/~sircmpwn/scdoc"
14
- license = "Unknown "
14
+ license = "MIT "
15
15
settings = "os" , "arch" , "compiler" , "build_type"
16
16
_autotools = None
17
- no_copy_source = True
18
17
19
18
@property
20
19
def _source_subfolder (self ):
21
20
return "source_subfolder"
22
21
23
22
def build_requirements (self ):
24
- self .build_requires ("make/[>= 4.3.0] " )
23
+ self .build_requires ("make/4.3" )
25
24
26
25
def configure (self ):
27
26
del self .settings .compiler .libcxx
@@ -47,13 +46,12 @@ def _configure_autotools(self):
47
46
48
47
def build (self ):
49
48
autotools = self ._configure_autotools ()
50
- with tools .chdir (os . path . join ( self .source_folder , self . _source_subfolder ) ):
49
+ with tools .chdir (self ._source_subfolder ):
51
50
autotools .make ()
52
- autotools .make (target = "check" )
53
51
54
52
def package (self ):
55
53
autotools = self ._configure_autotools ()
56
- with tools .chdir (os . path . join ( self .source_folder , self . _source_subfolder ) ):
54
+ with tools .chdir (self ._source_subfolder ):
57
55
autotools .install (args = [f"PREFIX={ self .package_folder } " ])
58
56
self .copy (pattern = "COPYING" , dst = "licenses" ,
59
57
src = self ._source_subfolder )
@@ -69,9 +67,6 @@ def package_info(self):
69
67
self ._chmod_plus_x (os .path .join (scdoc_root , "scdoc" ))
70
68
71
69
def validate (self ):
72
- if self .settings .os == "Macos" :
70
+ if self .settings .os in [ "Macos" , "Windows" ] :
73
71
raise ConanInvalidConfiguration (
74
- "Builds aren't supported on Macos" )
75
- if self .settings .os == "Windows" :
76
- raise ConanInvalidConfiguration (
77
- "Builds aren't supported on Windows" )
72
+ f"Builds aren't supported on { self .settings .os } " )
0 commit comments