avatar
abfonly has added 46b0f8d446
Imported from SRPM
... ... --- /dev/null
... ... +++ b/.abf.yml
... ... @@ -0,0 +1,3 @@
1
sources:
2
  depthgun.love: 5fd0ed05023f2d22c215100dd11d846ce939c77d
3
  title.png: 4014572f77debf4e17b833c04efb9562789e1999
... ... --- /dev/null
... ... +++ b/depthgun.spec
... ... @@ -0,0 +1,71 @@
1
%define  distsuffix mrb
2
3
Name:           depthgun
4
Version:        0.1
5
Release:        1
6
Summary:        Journey through intestine
7
Group:          Games/Arcade
8
# not declared license so it's mrb only
9
License:        NONE
10
Url:            https://leafo.itch.io/depth-gun
11
Source0:        depthgun.love
12
Source1:        https://github.com/leafo/ludum-dare-38/raw/master/images/title.png
13
BuildRequires:  imagemagick
14
BuildRequires:  zip
15
16
Requires:       love >= 0.10
17
BuildArch:      noarch
18
19
%description
20
%{summary}
21
22
23
24
%files
25
%{_datadir}/applications/%{name}.desktop
26
%{_gamesbindir}/%{name}
27
%{_gamesdatadir}/%{name}/%{name}.love
28
%{_iconsdir}/hicolor/*/apps/%{name}.*
29
30
#----------------------------------------------------------------------------
31
32
%prep
33
34
%build
35
36
%install
37
# data
38
39
install -D -m644 %{SOURCE0} %{buildroot}%{_gamesdatadir}/%{name}/%{name}.love
40
41
# wrapper
42
mkdir -p %{buildroot}%{_gamesbindir}
43
cat > %{buildroot}%{_gamesbindir}/%{name} << EOF
44
#!/bin/sh
45
love %{_gamesdatadir}/%{name}/%{name}.love
46
EOF
47
chmod 0755 %{buildroot}%{_gamesbindir}/%{name}
48
49
# Desktop entry
50
mkdir -p %{buildroot}%{_datadir}/applications
51
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
52
[Desktop Entry]
53
Name=%{name}
54
GenericName=%{summary}
55
Comment=%{summary}
56
Exec=%{name}
57
Icon=%{name}
58
Terminal=false
59
Type=Application
60
Categories=Game;ArcadeGame;
61
EOF
62
63
64
# icons
65
for size in 256x256 128x128 96x96 64x64 48x48 32x32 22x22 16x16 ; do
66
    install -dm 0755 \
67
        %{buildroot}%{_iconsdir}/hicolor/$size/apps
68
    convert -strip -resize $size %{SOURCE1} \
69
        %{buildroot}%{_iconsdir}/hicolor/$size/apps/%{name}.png
70
done
71

Comments