-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlibpathcomp.spec
More file actions
178 lines (146 loc) · 6.59 KB
/
libpathcomp.spec
File metadata and controls
178 lines (146 loc) · 6.59 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#
# spec file for package libpathcomp
#
# Copyright (c) 2016 Edward Baudrez <edward.baudrez@gmail.com>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
Name: libpathcomp
Version: 0.4
Release: 1
%define lib_name libpathcomp
%define so_version 1
Summary: C library for composing and working with structured pathnames
URL: http://github.com/ebaudrez/libpathcomp
License: GPL-2.0+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %{name}-%{version}.tar.gz
%description
Libpathcomp is a C library for composing and working with structured pathnames.
With it, you can build pathnames like
/opt/data/N6/N6_8903.dat
from a template specified in a config file, and a few lines of C code.
Libpathcomp has the following features:
* It takes its information from a configuration file. No recompilation
required when the configuration file changes.
* Settings from the configuration file can be overridden at run time.
* Constructed pathnames are allocated dynamically, and are automatically of
the right size. Static or fixed-size buffers are not needed.
* It supports functions written in Lua, to construct arbitrarily complex
pathnames.
* It supports 'variations' of pathnames, like multiple possibilities for a
file extension, multiple root directories (sort of like a search path), etc.
* It has a few convenience functions to make it easy to work with the
constructed pathnames, e.g., checking for existence, creating the containing
directory, finding the first (or all) of a set of files.
%package -n %lib_name%so_version
Summary: C library for composing and working with structured pathnames - shared library
Group: System/Libraries
%description -n %lib_name%so_version
Libpathcomp is a C library for composing and working with structured pathnames.
With it, you can build pathnames like
/opt/data/N6/N6_8903.dat
from a template specified in a config file, and a few lines of C code.
Libpathcomp has the following features:
* It takes its information from a configuration file. No recompilation
required when the configuration file changes.
* Settings from the configuration file can be overridden at run time.
* Constructed pathnames are allocated dynamically, and are automatically of
the right size. Static or fixed-size buffers are not needed.
* It supports functions written in Lua, to construct arbitrarily complex
pathnames.
* It supports 'variations' of pathnames, like multiple possibilities for a
file extension, multiple root directories (sort of like a search path), etc.
* It has a few convenience functions to make it easy to work with the
constructed pathnames, e.g., checking for existence, creating the containing
directory, finding the first (or all) of a set of files.
This package contains the shared library.
%package devel
Summary: C library for composing and working with structured pathnames - header files
Group: Development/Libraries/C and C++
BuildRequires: pkg-config
Requires: %lib_name%so_version = %{version}
%if 0%{?suse_version}
Recommends: %{name}-util = %{version}
%endif
%description devel
Libpathcomp is a C library for composing and working with structured pathnames.
With it, you can build pathnames like
/opt/data/N6/N6_8903.dat
from a template specified in a config file, and a few lines of C code.
Libpathcomp has the following features:
* It takes its information from a configuration file. No recompilation
required when the configuration file changes.
* Settings from the configuration file can be overridden at run time.
* Constructed pathnames are allocated dynamically, and are automatically of
the right size. Static or fixed-size buffers are not needed.
* It supports functions written in Lua, to construct arbitrarily complex
pathnames.
* It supports 'variations' of pathnames, like multiple possibilities for a
file extension, multiple root directories (sort of like a search path), etc.
* It has a few convenience functions to make it easy to work with the
constructed pathnames, e.g., checking for existence, creating the containing
directory, finding the first (or all) of a set of files.
This package contains the header files and other files necessary for developing
new projects.
%package util
Summary: C library for composing and working with structured pathnames - utility
Group: Productivity/File utilities
Requires: %lib_name%so_version = %{version}
%description util
Libpathcomp is a C library for composing and working with structured pathnames.
With it, you can build pathnames like
/opt/data/N6/N6_8903.dat
from a template specified in a config file, and a few lines of C code.
Libpathcomp has the following features:
* It takes its information from a configuration file. No recompilation
required when the configuration file changes.
* Settings from the configuration file can be overridden at run time.
* Constructed pathnames are allocated dynamically, and are automatically of
the right size. Static or fixed-size buffers are not needed.
* It supports functions written in Lua, to construct arbitrarily complex
pathnames.
* It supports 'variations' of pathnames, like multiple possibilities for a
file extension, multiple root directories (sort of like a search path), etc.
* It has a few convenience functions to make it easy to work with the
constructed pathnames, e.g., checking for existence, creating the containing
directory, finding the first (or all) of a set of files.
This package contains the standalone utility.
%prep
%setup -q
%build
%configure --disable-static --with-pic
make %{?_smp_mflags}
%install
%make_install
rm -vf %{buildroot}%{_libdir}/*.la
%check
make check %{?_smp_mflags} || (cat ./test/test-suite.log && false)
%post -n %lib_name%so_version
/sbin/ldconfig
%postun -n %lib_name%so_version
/sbin/ldconfig
%files -n %lib_name%so_version
%defattr(-, root, root)
%{_libdir}/libpathcomp.so.1.1.0
%{_libdir}/libpathcomp.so.1
%files devel
%defattr(-, root, root)
%doc COPYING README.md
%{_includedir}/pathcomp.h
%{_includedir}/pathcomp/log.h
%{_libdir}/libpathcomp.so
%{_libdir}/pkgconfig/libpathcomp.pc
%files util
%defattr(-, root, root)
%{_bindir}/pathcomp
%changelog
* Tue Oct 4 2016 Edward Baudrez <edward.baudrez@gmail.com>
- initial release