summaryrefslogtreecommitdiffstats
path: root/funpl/lua-loop.spec
blob: 3c57b8c040040842a6f94779fe990a967ef9bc58 (plain)
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
%define luaver 5.1
%define luapkgdir %{_datadir}/lua/%{luaver}

Name:           lua-loop
Version:        2.3
Release:        0.2.beta%{?dist}
Summary:        Class models for Lua

Group:          Development/Libraries
License:        MIT
URL:            http://loop.luaforge.net/
Source0:        http://luaforge.net/frs/download.php/3525/loop-2.3-beta.tar.gz
BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires:       lua >= %{luaver}

BuildArch:      noarch

%description
LOOP stands for Lua Object-Oriented Programming and is a set of
packages for supporting different models of object-oriented
programming in the Lua language.

LOOP models are mainly concerned with dynamicity, although there is an
attempt to keep them as simple and efficient as
possible. Additionally, LOOP uses fundamental Lua concepts like tables
(objects) and meta-tables (classes), traditionally used to enable an
object-oriented programming style, to provide a common ground for the
interoperability of objects and classes of its different models.


%package        doc
Summary:        Documentation for %{name}
Group:          Documentation
Requires:       %{name} = %{version}-%{release}

%description    doc
LOOP stands for Lua Object-Oriented Programming and is a set of
packages for supporting different models of object-oriented
programming in the Lua language.

This package contains documentation for %{name}.


%prep
%setup -q -n loop-%{version}-beta
chmod +x lua/*.lua
for f in doc/*.css; do
  touch -r $f timestamp.txt
  sed -i 's|\r||' $f
  touch -r timestamp.txt $f
done


%build


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{luapkgdir}
cp -pr lua/loop $RPM_BUILD_ROOT%{luapkgdir}
for f in precompiler preloader;
do
    cp -p lua/$f.lua $RPM_BUILD_ROOT%{_bindir}/loop-$f.lua
done



%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc LICENSE RELEASE
%{_bindir}/loop-*.lua
%{luapkgdir}/*

%files doc
%defattr(-,root,root,-)
%doc doc/*


%changelog
* Sun Nov  7 2010 Michel Salim <salimma@fedoraproject.org> - 2.3-0.2.beta
- Move scripts to %%{_bindir} and prefix them with loop-
- Remove unneeded dependencies

* Thu Oct  1 2009 Michel Salim <salimma@fedoraproject.org> - 2.3-0.1.beta
- Initial package