| •1 |
#!/usr/bin/env python3 |
| 2 |
import os |
| 3 |
import os.path |
| 4 |
import sys |
| 5 |
|
| 6 |
template = ''' |
| 7 |
prefix=/usr |
| 8 |
exec_prefix=${prefix} |
| 9 |
libdir=${prefix}/lib/%(DEB_HOST_MULTIARCH)s |
| 10 |
includedir=${prefix}/include |
| 11 |
|
| 12 |
Name: skia |
| 13 |
Description: 2D graphics library |
| 14 |
Version: %(FULL_VERSION)s |
| 15 |
Libs: -L${libdir} -lskia |
| 16 |
Cflags: -I${includedir}/skia |
| 17 |
''' |
| 18 |
|
| 19 |
if len(sys.argv) < 2: |
| 20 |
print("Expected output path.") |
| 21 |
exit(1) |
| 22 |
|
| 23 |
output = sys.argv[1] |
| 24 |
|
| 25 |
os.makedirs(os.path.dirname(output), exist_ok=True) |
| 26 |
|
| 27 |
with open(output, 'w') as f: |
| 28 |
f.write((template.strip() % os.environ) + "\n") |
| 29 |
|