]> git.pld-linux.org Git - packages/lua-filesystem.git/blob - lua-filesystem.spec
O: original lua-filesystem package for lua 5.1; rel 2
[packages/lua-filesystem.git] / lua-filesystem.spec
1 %bcond_without  lua51           # lua51 package
2 %bcond_without  lua53           # lua53 package
3
4 %define         real_name       luafilesystem
5 %define         tag_ver         %(echo %{version} | tr . _)
6
7 Summary:        File System Library for Lua
8 Summary(hu.UTF-8):      Fájlrendszer-könyvtár Lua-hoz.
9 Name:           lua54-filesystem
10 Version:        1.8.0
11 Release:        2
12 License:        BSD-like
13 Group:          Development/Languages
14 Source0:        https://github.com/keplerproject/luafilesystem/archive/v%{tag_ver}/%{real_name}-%{version}.tar.gz
15 # Source0-md5:  b012ab5292237a8d69a193d5798b2157
16 URL:            https://keplerproject.github.io/luafilesystem/
17 BuildRequires:  lua54-devel
18 BuildRequires:  rpmbuild(macros) >= 1.605
19 %if %{with lua51}
20 BuildRequires:  lua51-devel
21 %endif
22 %if %{with lua53}
23 BuildRequires:  lua53-devel
24 %endif
25 Requires:       lua54-libs
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 LuaFileSystem is a Lua library developed to complement the set of
30 functions related to file systems offered by the standard Lua
31 distribution.
32
33 %description -l hu.UTF-8
34 LuaFileSystem egy Lua könyvtár, amely függvények halmazát nyújtja,
35 hogy a fájlrendszeren műveleteket végezhess.
36
37 %package -n lua51-filesystem
38 Summary:        File System Library for Lua
39 Summary(hu.UTF-8):      Fájlrendszer-könyvtár Lua-hoz.
40 Requires:       lua51-libs
41 Obsoletes:      lua-filesystem < 1.7.0.2
42
43 %description -n lua51-filesystem
44 LuaFileSystem is a Lua library developed to complement the set of
45 functions related to file systems offered by the standard Lua
46 distribution.
47
48 Package for Lua 5.1.
49
50 %description -l hu.UTF-8
51 LuaFileSystem egy Lua könyvtár, amely függvények halmazát nyújtja,
52 hogy a fájlrendszeren műveleteket végezhess.
53
54 Package for Lua 5.1.
55
56 %package -n lua53-filesystem
57 Summary:        File System Library for Lua
58 Summary(hu.UTF-8):      Fájlrendszer-könyvtár Lua-hoz.
59 Requires:       lua53-libs
60
61 %description -n lua53-filesystem
62 LuaFileSystem is a Lua library developed to complement the set of
63 functions related to file systems offered by the standard Lua
64 distribution.
65
66 Package for Lua 5.3.
67
68 %description -l hu.UTF-8
69 LuaFileSystem egy Lua könyvtár, amely függvények halmazát nyújtja,
70 hogy a fájlrendszeren műveleteket végezhess.
71
72 Package for Lua 5.3.
73
74 %prep
75 %setup -q -n %{real_name}-%{tag_ver}
76
77 %{__mkdir} build-5.4
78 %{?with_lua51:%{__mkdir} build-5.1}
79 %{?with_lua53:%{__mkdir} build-5.3}
80
81 %build
82 %{__make} clean
83 %{__make} \
84         CC="%{__cc}" \
85         WARN="%{rpmcflags} %{rpmcppflags} -fPIC" \
86         LUA_VERSION=5.4 \
87         PREFIX=%{_prefix} \
88         LUA_LIBDIR=%{_libdir}/lua/5.4
89
90 %{__mv} src/lfs.so build-5.4
91
92 %if %{with lua51}
93 %{__make} clean
94 %{__make} \
95         CC="%{__cc}" \
96         WARN="%{rpmcflags} %{rpmcppflags} -fPIC" \
97         LUA_VERSION=5.1 \
98         PREFIX=%{_prefix} \
99         LUA_LIBDIR=%{_libdir}/lua/5.1
100
101 %{__mv} src/lfs.so build-5.1
102 %endif
103
104 %if %{with lua53}
105 %{__make} clean
106 %{__make} \
107         CC="%{__cc}" \
108         WARN="%{rpmcflags} %{rpmcppflags} -fPIC" \
109         LUA_VERSION=5.3 \
110         PREFIX=%{_prefix} \
111         LUA_LIBDIR=%{_libdir}/lua/5.3
112
113 %{__mv} src/lfs.so build-5.3
114 %endif
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 install -d $RPM_BUILD_ROOT%{_libdir}/lua/5.4
120 install -p build-5.4/lfs.so $RPM_BUILD_ROOT%{_libdir}/lua/5.4/lfs.so
121
122 %if %{with lua51}
123 install -d $RPM_BUILD_ROOT%{_libdir}/lua/5.1
124 install -p build-5.1/lfs.so $RPM_BUILD_ROOT%{_libdir}/lua/5.1/lfs.so
125 %endif
126
127 %if %{with lua53}
128 install -d $RPM_BUILD_ROOT%{_libdir}/lua/5.3
129 install -p build-5.3/lfs.so $RPM_BUILD_ROOT%{_libdir}/lua/5.3/lfs.so
130 %endif
131
132 %clean
133 rm -rf $RPM_BUILD_ROOT
134
135 %files
136 %defattr(644,root,root,755)
137 %doc README.md doc/us/*
138 %attr(755,root,root) %{_libdir}/lua/5.4/lfs.so
139
140 %if %{with lua51}
141 %files -n lua51-filesystem
142 %defattr(644,root,root,755)
143 %doc README.md doc/us/*
144 %attr(755,root,root) %{_libdir}/lua/5.1/lfs.so
145 %endif
146
147 %if %{with lua53}
148 %files -n lua53-filesystem
149 %defattr(644,root,root,755)
150 %doc README.md doc/us/*
151 %attr(755,root,root) %{_libdir}/lua/5.3/lfs.so
152 %endif
This page took 0.119845 seconds and 3 git commands to generate.