summaryrefslogtreecommitdiff
path: root/beyond-the-titanic/beyond-the-titanic.spec
blob: 2e620567f4c489cd24e225b46f4a01a04562d37f (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
%global     use_master 1
%if 0%{use_master}
%global vername master
%else
%global vername %{version}
%endif

# turn off debug package
%define debug_package %{nil}

Name:       beyond-the-titanic
Version:    0.0.1
Release:    2%{?dist}
Summary:    Text adventure game from 1988

Group:      Games/AdventureGame
License:    AGPL
URL:        https://gitlab.com/bgstack15/%{name}
Source0:    %{URL}/-/archive/%{vername}/%{name}-%{vername}.tar.gz

Packager:   B Stack <bgstack15@gmail.com>
BuildRequires: fpc
BuildRequires: ImageMagick
# do not require the icon theme. the rpm can make the dirs, and it won't hurt on terminal-only systems to have the directories with just these icons.
#Requires:      hicolor-icon-theme

%description
Beyond the Titanic is a 1988 text adventure game published by Apogee.
In 2009 the source code was released under the GPL. This fork is
derived from the jxself release.

%prep
#%%setup -n %%{name}-%%{vername}
tar -zxf %{SOURCE0}

%build
cd %{name}-*
%make_build

%install
cd %{name}-*
%make_install

# desktop files
# handled by upstream makefile

# application start script
# handled by upstream makefile

# man pages
# none

# mimetypes
# none

# icons
for res in 16 22 24 32 48 64 96 128 256 ;do
  dir=%{buildroot}%{_datadir}/icons/hicolor/${res}x${res}/apps
  mkdir -p ${dir}
  for icon in %{name} ; do
    convert ship.svg -filter Lanczos -resize ${res}x${res}  \
      ${dir}/${icon}.png
  done
done
scalable_dir="%{buildroot}%{_datadir}/icons/hicolor/scalable/apps"
install -d "${scalable_dir}"
install -m0644 ship.svg "${scalable_dir}"

%clean
%{__rm} -rf %{buildroot} || :

%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
update-desktop-database &> /dev/null || :

%preun
# is it a final removal?
#if test "$1" = "0" ;
#then
#fi

%postun
update-desktop-database &> /dev/null || :

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%files
#%license %attr(444, -, -) License.txt
#%doc %attr(444, -, -) Changelog.txt
%license %attr(444, -, -) %{_licensedir}/*
%doc %attr(444, -, -) %{_docdir}/*/*
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/%{name}

%changelog
* Fri Apr  5 2019 B Stack <bgstack15@gmail.com> - 0.0.1-2
- add build dependencies
- fix docdir for el

* Sun Mar 31 2019 B Stack <bgstack15@gmail.com> - 0.0.1-1
- Initial rpm built
bgstack15