Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Compiled Object files
*.slo
*.lo
*.o

# Compiled Dynamic libraries
*.so

# Compiled Static libraries
*.lai
*.la
*.a

# Compiled Bins.
a.out

# Latex
*.log
*.aux
*.nav
*.out
*.snm
*.toc

# Backup files
*~
.*.sw*
.backups
.backup

# svn
.svn

# autotools
*.in
Makefile
*.m4
*.cache/
build-aux/depcomp
build-aux/install-sh
build-aux/missing
stamp-h1
cabrio.spec
config.status
configure
packages/debian/control
src/.deps/
src/config.h

45 changes: 0 additions & 45 deletions Makefile

This file was deleted.

69 changes: 69 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
SUBDIRS=src/ test

## Place generated object files (.o) into the same directory as their source
## files, in order to avoid collisions when non-recursive make is used.
AUTOMAKE_OPTIONS = subdir-objects

## Additional flags to pass to aclocal when it is invoked automatically at
## make time. The ${ACLOCAL_FLAGS} variable is picked up from the environment
## to provide a way for the user to supply additional arguments.
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}

## Install the generated pkg-config file (.pc) into the expected location for
## architecture-dependent package configuration information. Occasionally,
## pkg-config files are also used for architecture-independent data packages,
## in which case the correct install location would be $(datadir)/pkgconfig.
##pkgconfigdir = $(libdir)/pkgconfig
##pkgconfig_DATA = cabrio-$(PACKAGE_VERSION_MAJOR).pc

## Define an independent executable script for inclusion in the distribution
## archive. However, it will not be installed on an end user's system due to
## the noinst_ prefix.
dist_noinst_SCRIPTS = bootstrap.sh


TEMP_PKG_RPM_DIR=$(abs_top_builddir)/packages/rpm
TEMP_PKG_DEB_DIR=$(abs_top_builddir)/packages/debian/root

# Create a deb package
pkg-deb:
mkdir -p $(TEMP_PKG_DEB_DIR)/DEBIAN

make DESTDIR=$(TEMP_PKG_DEB_DIR) install
cp packages/debian/control $(TEMP_PKG_DEB_DIR)/DEBIAN/control
echo -n 'Depends: ' >> $(TEMP_PKG_DEB_DIR)/DEBIAN/control
find $(TEMP_PKG_DEB_DIR) -not -type d | xargs -n1 objdump -p 2>/dev/null \
| grep 'NEEDED ' |tr -s ' ' |cut -f 3 -d ' ' | \
xargs -n1 dpkg -S |cut -f1 -d: | sort -u | sed '/^$$/d' | sed '/^ /d' | xargs echo | tr ' ' ',' >> $(TEMP_PKG_DEB_DIR)/DEBIAN/control
echo >> $(TEMP_PKG_DEB_DIR)/DEBIAN/control
dpkg --build $(TEMP_PKG_DEB_DIR) $(TEMP_PKG_DEB_DIR)/../$(PACKAGE_NAME)-$(PACKAGE_VERSION_API).deb
- rm -r $(TEMP_PKG_DEB_DIR)

# Create an RPM package
# Depend of all rule
pkg-rpm: all
mkdir -p $(TEMP_PKG_RPM_DIR)/RPMS/i386
mkdir -p $(TEMP_PKG_RPM_DIR)/SRPMS
mkdir -p $(TEMP_PKG_RPM_DIR)/BUILD
mkdir -p $(TEMP_PKG_RPM_DIR)/SOURCES
mkdir -p $(TEMP_PKG_RPM_DIR)/tmp
@- rm -rf $(TEMP_PKG_RPM_DIR)/BUILD/$(PACKAGE_NAME)-root
@- ln -s $(abs_top_builddir) $(TEMP_PKG_RPM_DIR)/BUILD/$(PACKAGE_NAME)-root
@- rm -rf $(TEMP_PKG_RPM_DIR)/RPMS/$(PACKAGE_NAME)-*
@- rm -rf $(TEMP_PKG_RPM_DIR)/SRPMS/$(PACKAGE_NAME)-*
@- rm -rf $(TEMP_PKG_RPM_DIR)/SOURCES/$(PACKAGE_NAME)-*

# Find binary deps for binary in $(abs_top_builddir) to write in rpm
# deps in cabrio.spec
sed -i s/"^Requires: /Requires: ` ( find $(abs_top_builddir) -not -type d \
| xargs -n1 objdump -p | grep 'NEEDED ' \
| tr -s ' ' |cut -f 3 -d ' ' | sort -u \
| xargs -n 1 printf -- " -e %s" \
| xargs -I'{}' bash -c 'rpm -q -a --filesbypkg | grep {}' \
| tr -s ' ' | cut -f1 -d ' ' | sort -u \
| xargs echo | tr ' ' ',' ) 2> /dev/null `/"g $(abs_top_builddir)/$(PACKAGE_NAME).spec

- rpmbuild --with noconfigure --quiet --nodeps --define="_topdir $(TEMP_PKG_RPM_DIR)" \
-bb $(abs_top_builddir)/$(PACKAGE_NAME).spec
mv $(TEMP_PKG_RPM_DIR)/RPMS/i386/$(PACKAGE_NAME)-$(PACKAGE_VERSION_API)-*.i386.rpm $(TEMP_PKG_RPM_DIR)/../

22 changes: 0 additions & 22 deletions Makefile.mingw

This file was deleted.

29 changes: 24 additions & 5 deletions README → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Cabrio is an emulator front-end primarily designed for use with arcade
cabinets. It features a simple graphical interface which is easy to use
with limited controls (e.g. a joystick).


Installation
------------
You will need the following libraries and their headers/development packages:

* SDL
* SDL_image
* SDL_gfx
Expand All @@ -18,12 +18,30 @@ You will need the following libraries and their headers/development packages:
* libxml2
* ffmpeg

Compile the program by running 'make' in this directory. Install by running
'make install' (this will usually have to be done as root, but the location
can be edited in the Makefile).
To configure, compile and install the program run:
```ShellScript
./configure --prefix=/usr
make -j 3
make install
```

See http://www.cabrio-fe.org/support/compile.html for more information.
To make a **.rpm** package:

```ShellScript
./configure --prefix=/usr
make -j 3
make pkg-rpm
```

To make a **.deb** package:

```ShellScript
./configure --prefix=/usr
make -j 3
make pkg-deb
```

See http://www.cabrio-fe.org/support/compile.html for more information.

Configuration
-------------
Expand All @@ -46,3 +64,4 @@ Astronomy, Heidelberg). http://hubblesite.org/

Default font "FreeSans.ttf" courtesy of the GNU FreeFont project:
http://www.gnu.org/software/freefont/

17 changes: 17 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh -e

test -n "${srcdir}" || srcdir=`dirname "$0"`
test -n "${srcdir}" || srcdir=.

if [ ! "${NO_CHANGELOG}" ] ; then
(
cd "${srcdir}"
git log > ChangeLog
)
fi

#libtoolize --ltdl
autoreconf --force --install --verbose "$srcdir"
test -n "${NOCONFIGURE}" || "${srcdir}/configure" "$@"
#test -n "${NOCONFIGURE}" || "${srcdir}/configure" --enable-silent-rules --disable-dependency-tracking "$@"

10 changes: 10 additions & 0 deletions build-aux/packages/debian/control.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Source: @PACKAGE_NAME@
Section: Server
Priority: optional
Maintainer: @PACKAGE_AUTHOR@ <@PACKAGE_AUTHOR_EMAIL@>
Version: @PACKAGE_VERSION_API@
Package: @PACKAGE_NAME@
Architecture: any
Depends: @PACKAGE_REQUIRED_RUNTIME@
Description: @PACKAGE_DESCRIPTION_SHORT@
@PACKAGE_DESCRIPTION_LONG@
43 changes: 43 additions & 0 deletions cabrio.spec.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
%{?_with_noconfigure:%define exec_configure 0}
%{!?_with_noconfigure:%define exec_configure 1}

Summary: @PACKAGE_DESCRIPTION_SHORT@
Name: @PACKAGE_NAME@
Provides: @PACKAGE_NAME@
Version: @PACKAGE_VERSION_API@
Release: @PACKAGE_VERSION_MINOR_FIX@
License: GPL
Group: Server
Source0: %{name}-%{version}.tar.bz2
URL: @PACKAGE_URL@
Vendor: @PACKAGE_AUTHOR@ <@PACKAGE_AUTHOR_EMAIL@>
Packager: @PACKAGE_AUTHOR@ <@PACKAGE_AUTHOR_EMAIL@>
#BuildArch: i386
BuildRoot: %{_builddir}/%{name}-root
Requires: @PACKAGE_REQUIRED_RUNTIME@
BuildRequires: @PACKAGE_REQUIRED_BUILD@

%description
@PACKAGE_DESCRIPTION_LONG@

%prep
%setup -D -T -n %{name}-root

%build
%if %{exec_configure}
./configure --prefix=/usr
%endif
make

%install
make DESTDIR=%{buildroot} install

#%clean
#rm -rf %{buildroot}

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

Loading