LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File lix.spec of Package lix (Project games)

#
# spec file for package lix
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           lix
Version:        2016.01.09
Release:        0
Summary:        Action-puzzle game, single- and networked multiplayer, inspired by Lemmings
License:        CC0-1.0
Group:          Amusements/Games/Other
Url:            http://asdfasdf.ethz.ch/~simon/
Source:         https://github.com/SimonN/Lix/archive/v2016-01-09.tar.gz
BuildRequires:  gcc-c++
BuildRequires:  chrpath
BuildRequires:  libtool
BuildRequires:  fdupes
BuildRequires:  dos2unix
BuildRequires:  pkgconfig(allegro)
BuildRequires:  pkgconfig(libenet)
BuildRequires:  pkgconfig(libpng)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Lix is a multiplayer action puzzle game. It comes with a level editor
and also a singleplayer puzzle mode.

%prep
%setup -q -n Lix-2016-01-09
dos2unix doc/*txt README.TXT
find levels/network/ -type f -exec dos2unix {} \;
find levels/network/*p/amanda/* -type f -exec chmod -x {} \;

%build
make %{?_smp_mflags}

%install
mkdir -p %{buildroot}%{_bindir}

cat >> %{buildroot}%{_bindir}/lixd <<EOF
#!/bin/sh
cd %{_libexecdir}/lix/
exec ./bin/lixd "$@"
EOF
chmod +x %{buildroot}%{_bindir}/lixd

cat >> %{buildroot}%{_bindir}/lix <<EOF
#!/bin/sh
cd %{_libexecdir}/lix/
exec ./bin/lix "$@"
EOF
chmod +x %{buildroot}%{_bindir}/lix

install -Dm755 bin/lix %{buildroot}%{_libexecdir}/lix/bin/lix
install -Dm755 bin/lixd %{buildroot}%{_libexecdir}/lix/bin/lixd

chrpath --delete %{buildroot}%{_libexecdir}/lix/bin/lix
chrpath --delete %{buildroot}%{_libexecdir}/lix/bin/lixd

cp -R data/ levels/ images/ %{buildroot}%{_libexecdir}/lix/

rm %{buildroot}%{_libexecdir}/lix/data/user/.gitignore

%fdupes %{buildroot}%{_libexecdir}/lix/

%files
%defattr(-,root,root)
%doc doc/*.txt README.TXT
%{_bindir}/lix
%{_bindir}/lixd
%dir %{_libexecdir}/lix/
%{_libexecdir}/lix/bin
%{_libexecdir}/lix/levels
%{_libexecdir}/lix/data
%{_libexecdir}/lix/images

%changelog