Checkpoint
[pwan.org.git] / content / hints / lua-macros-in-rpm-specfiles.rst
1 Using Lua macros in an RPM specfile
2 ###################################
3
4 :date: 2015-07-12
5 :tags: hint,lua,rpmbuild,rpm,specilfe
6 :fcategory: hints
7 :author: Jude N
8
9 I've found using Lua macros in rpm spec files to be pretty useful. I haven't found many examples of their use online, so here's how I ended up using them.
10
11 I had a situation where I needed to make a subpackage from all the files in a number of different subdirectories. The structure of the files in the subdirectories was fixed,
12 but the number of subdirectories could change over time, and I didn't want to have to update the spec file each time a new subdirectory was added or removed.
13
14
15
16
17 .. _lua macros in rpm spec files: http://www.rpm.org/wiki/PackagerDocs/RpmLua