#
# Adapter adapts .spec files for PLD Linux.
#
-# Copyright (C) 1999-2016 PLD-Team <feedback@pld-linux.org>
+# Copyright (C) 1999-2017 PLD-Team <feedback@pld-linux.org>
# Authors:
# Michał Kuratczyk <kura@pld.org.pl>
# Sebastian Zagrodzki <s.zagrodzki@mimuw.edu.pl>
b_idx = 0 # index of BR/R arrays
BR_count = 0 # number of additional BuildRequires
+ # %global defines
+ globals["nil"] = ""
+
# If variable removed, then 1 (for removing it from export)
removed["LDFLAGS"] = 0
removed["CFLAGS"] = 0
}
}
+# load globals
+/^%global/ {
+ globals[$2] = $3;
+}
+
/^%define/ {
# FIXME: this section will likely never match after cvs->git migration
if ($2 == "date") {
if (subver) {
sub("%{subver}", subver, str)
}
+
+ if (globals["gh_owner"]) {
+ sub("%{gh_owner}", globals["gh_owner"], str)
+ }
+ if (globals["gh_project"]) {
+ sub("%{gh_project}", globals["gh_project"], str)
+ }
return str
}