You are not logged in.
Hi. I'm fairly new to Arch but not to Linux or compiling my own software. I've just converted my boys' computer from Mandriva to Arch and they are really excited about always having the newest version of wesnoth and widelands etc. One thing they are missing is Copter Commander.
It isn't in Arch or the AUR so I thought I'd submit it myself.
I've already run into some non-standard things though:
'make' can't find gnome-config
/usr/local is the default in the Makefile
there will probably be more. I can, most likely, get it to compile and install myself, but I want to do this right and get a good, solid PKGBUILD out of it.
Thanks for your help.
I'll look through the forums and other PKGBUILDs for answers as well.
Last edited by fiddlinmacx (2011-06-24 14:30:51)
Offline
Hi,
Look at the Mkefile: http://coco.cvs.sourceforge.net/viewvc/ … iew=markup
you can see that the path is defined in the variable: COCO_INSTALL_DIRECTORY, you can redefine it as shown in the comments.
About gnome-config, it might mean libgnome is missing.
Cheers.
Offline
Thanks Spip;
I know I can edit the Makefile to get the thing to complile, but how to I get' makepkg' to do so automatically?
Is it best practice to pass such a thing on the 'make' command line like:
<code>make COCO_INSTALL_DIRECTORY="/usr"</code>
libgnome is installed and gnome-config is present, but 'make' doesn't find it. Do I pass another variable on the command line?
Last edited by fiddlinmacx (2011-06-24 14:40:56)
Offline
OK. So if I replace all instances of 'gnome-config' with 'pkg-config' in the Makefile 'make' gets much farther.
Now it complains about 'gnomeui' and wants the directory with 'gnomui.pc' to be in the PKG_CONFIG_PATH environment variable. I can't fine 'gnomeui.pc' but I do have 'libgnomeui' installed.
Oh, I missed it. It also complains that it can't fine the package 'gnome'.
Last edited by fiddlinmacx (2011-03-21 19:59:39)
Offline
Thanks Member;
I know I can edit the Makefile to get the thing to complile, but how to I get' makepkg' to do so automatically?
Is it best practice to pass such a thing on the 'make' command line like:
<code>make COCO_INSTALL_DIRECTORY="/usr"</code>
libgnome is installed and gnome-config is present, but 'make' doesn't find it. Do I pass another variable on the command line?
adding the install directory on the commandline is best practice, but NEVER give /usr as install directory in a PKGBUILD.
use $pkgdir/usr instead.
For more help it would be useful if you posted the PKGBUILD you got sofar.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Here's my current PKGBUILD much of which is still defaults from the Arch instructions:
# Maintainer: Mark Coolen <mark.coolen@gmail.com>
pkgname=copter-commander
pkgver=1.8
pkgrel=1
pkgdesc="A side-scrolling arcade/strategy game."
arch=(i686)
url="http://sourceforge.net/projects/coco"
license=('GPL')
groups=()
depends=('libgnome', 'gtkglarea')
makedepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=(http://downloads.sourceforge.net/project/coco/$pkgname/$pgkver/$pkgname-$pkgver.tar.bz2)
noextract=()
md5sums=(36b21dd8035fd6927c5500c031c31f0a) #generate with 'makepkg -g'
build() {
cd "$srcdir/$pkgname-$pkgver"
make COCO_INSTALL_DIRECTORY="$pkgdir/usr"
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir/" install
}Last edited by fiddlinmacx (2011-06-24 14:39:38)
Offline
I think I'm going to switch to the cvs version which has some newer files, like the Makefile. It's at:
http://coco.cvs.sourceforge.net/viewvc/coco/?view=tar
It needs clisp now, but I get other errors.like 'compiled file oo-compiler.fas was created by an older CLISP version and needs to be recompiled'.
I'm going to try to contact the developer too.
Any more suggestions are definitely welcome.
Offline
I stall can't get Copter Commander working. I know it's included in Mandriva and Mageia Contrib even in the present versions. If they can compile it, surely I can.
I've looked in the Mandriva cooker SRPM and found the following .spec file:
%define name copter-commander
%define version 1.8
%define release %mkrel 8
Summary: A 2d networked helicopter game
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.bz2
Patch0: %{name}-makefile-destdir.patch
Patch1: copter-commander-1.8-lvalue.patch
Source10: %name-16.png
Source11: %name-32.png
Source12: %name-48.png
License: GPLv2+
Group: Games/Arcade
Url: [url]http://sourceforge.net/projects/coco/[/url]
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildRequires: libgnome-devel
BuildRequires: libtiff-devel
BuildRequires: libgtkglarea-devel = 1.2.3
%description
A unique blend of arcade action and real time strategy, Copter Commander
is fun for novices but surprisingly deep. It supports one to four players
via Internet play and is based on the game design of Rescue Raiders/Armor
Alley.
%prep
%setup -q
%patch0 -p0
%patch1 -p0 -b .lvalue
%build
%make \
CFLAGS="$RPM_OPT_FLAGS" \
COCO_OPTIMIZATION_FLAGS="-O2" \
COCO_INSTALL_DIRECTORY=%_prefix \
COCO_BIN_DIRECTORY=%_gamesbindir \
COCO_SHARE_DIRECTORY=%_gamesdatadir/%name/%version
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std \
COCO_INSTALL_DIRECTORY=%_prefix \
COCO_BIN_DIRECTORY=%_gamesbindir \
COCO_SHARE_DIRECTORY=%_gamesdatadir/%name/%version
(
cd %buildroot%_gamesbindir
ln -s glx-%name %name-glx
)
mkdir -p %buildroot{%_miconsdir,%_iconsdir,%_liconsdir}
cp %SOURCE10 %buildroot%_miconsdir/%name.png
cp %SOURCE11 %buildroot%_iconsdir/%name.png
cp %SOURCE12 %buildroot%_liconsdir/%name.png
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop << EOF
[Desktop Entry]
Name=Copter Commander
Comment=Copter Commander
Exec=%_gamesbindir/%{name}
Icon=%{name}
Terminal=false
Type=Application
Categories=Game;ArcadeGame;X-MandrivaLinux-MoreApplications-Games-Arcade;
EOF
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}-glx.desktop << EOF
[Desktop Entry]
Name=Copter-Commander Glx
Comment=Copter Commander OpenGL
Exec=%_gamesbindir/glx-%{name}
Icon=%{name}
Terminal=false
Type=Application
Categories=Game;ArcadeGame;X-MandrivaLinux-MoreApplications-Games-Arcade;
EOF
%clean
rm -rf $RPM_BUILD_ROOT
%post
%if %mdkversion < 200900
%{update_menus}
%update_icon_cache hicolor
%postun
%{clean_menus}
%clean_icon_cache hicolor
%endif
%files
%defattr(-,root,root)
%doc DEVEL GNOME-HACKS ChangeLog INSTALL copyright
%_gamesbindir/*
%_gamesdatadir/%name
%_liconsdir/%name.png
%_iconsdir/%name.png
%_miconsdir/%name.png
%{_datadir}/applications/*.desktop
%changelog
* Thu May 14 2009 Samuel Verschelde <stormi@mandriva.org> 1.8-8mdv2010.0
+ Revision: 375634
- fix Licence
- fix Group (#49502)
- fix spec file (Patch0 was not applied)
* Fri Aug 15 2008 Götz Waschk <waschk@mandriva.org> 1.8-7mdv2009.0
+ Revision: 272473
- remove icon cache call, locolor has no icon theme (bug #42852)
* Wed Jul 23 2008 Thierry Vignaud <tv@mandriva.org> 1.8-6mdv2009.0
+ Revision: 243637
- rebuild
+ Pixel <pixel@mandriva.com>
- rpm filetriggers deprecates update_menus/update_scrollkeeper/update_mime_database/update_icon_cache/update_desktop_database/post_install_gconf_schemas
* Mon Feb 18 2008 Olivier Thauvin <nanardon@mandriva.org> 1.8-4mdv2008.1
+ Revision: 172117
- create directory for icons
- kill partial changelog rest
+ Thierry Vignaud <tv@mandriva.org>
- drop old menu
- kill re-definition of %%buildroot on Pixel's request
- kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated'
+ Olivier Blin <oblin@mandriva.com>
- restore BuildRoot
* Mon Jul 17 2006 Olivier Thauvin <nanardon@mandriva.org>
+ 2006-07-17 09:54:07 (41417)
- add patch1
* Mon Jul 17 2006 Olivier Thauvin <nanardon@mandriva.org>
+ 2006-07-17 09:53:28 (41416)
- fix build (patch1)
- xdg menu
- fix old menu section
* Mon Jul 17 2006 Olivier Thauvin <nanardon@mandriva.org>
+ 2006-07-17 09:32:28 (41415)
Import copter-commander
* Thu Jan 08 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.8-2mdk
- DIRM fix
- set RPM_OPT_FLAGS
* Mon Oct 13 2003 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.8-1mdk
- 1st mdk packageLast edited by fiddlinmacx (2011-06-24 14:36:50)
Offline
They also have two patches:
Index: gnome-kennel.c
===================================================================
--- gnome-kennel.c
+++ gnome-kennel.c 2006-07-17 11:29:09.000000000 +0200
@@ -293,7 +293,10 @@
if (child->widget == widget)
{
- (last ? last->next : kennel->children) = slist->next;
+ if (last)
+ last->next = slist->next;
+ else
+ kennel->children = slist->next;
g_slist_free_1 (slist);
g_free (child);
break;AND
--- Makefile.old 2003-10-13 12:20:10.000000000 +0200
+++ Makefile 2003-10-13 12:26:19.000000000 +0200
@@ -54,7 +54,8 @@
# INSTALLATION LOCATIONS
-COCO_INSTALL_DIRECTORY=/usr/local
+DESTDIR=
+COCO_INSTALL_DIRECTORY=/usr/
COCO_BIN_DIRECTORY=${COCO_INSTALL_DIRECTORY}/bin
COCO_SHARE_DIRECTORY=${COCO_INSTALL_DIRECTORY}/share/copter-commander/${COCO_MAJOR_VERSION}.${COCO_MINOR_VERSION}
COCO_DOC_DIRECTORY=${COCO_SHARE_DIRECTORY}/doc
@@ -477,17 +478,17 @@
install:
set -e ;\
mkdir -p \
- ${COCO_BIN_DIRECTORY} \
- ${COCO_SHARE_DIRECTORY} \
- ${COCO_DOC_DIRECTORY} \
- ${COCO_LEVEL_DIRECTORY} \
- ${COCO_SOUND_DIRECTORY} ;\
- install copter-commander ${COCO_BIN_DIRECTORY} ;\
- install glx-copter-commander ${COCO_BIN_DIRECTORY} ;\
- install -m u=rw,go=r keybindings.txt manual.txt copyright ${COCO_DOC_DIRECTORY} ;\
- install -m u=rw,go=r levels/*.ccl ${COCO_LEVEL_DIRECTORY} ;\
- install -m u=rw,go=r levels/*.cct ${COCO_LEVEL_DIRECTORY} ;\
- install -m u=rw,go=r sounds/*.wav ${COCO_SOUND_DIRECTORY}
+ $(DESTDIR)${COCO_BIN_DIRECTORY} \
+ $(DESTDIR)${COCO_SHARE_DIRECTORY} \
+ $(DESTDIR)${COCO_DOC_DIRECTORY} \
+ $(DESTDIR)${COCO_LEVEL_DIRECTORY} \
+ $(DESTDIR)${COCO_SOUND_DIRECTORY} ;\
+ install copter-commander $(DESTDIR)${COCO_BIN_DIRECTORY} ;\
+ install glx-copter-commander $(DESTDIR)${COCO_BIN_DIRECTORY} ;\
+ install -m u=rw,go=r keybindings.txt manual.txt copyright $(DESTDIR)${COCO_DOC_DIRECTORY} ;\
+ install -m u=rw,go=r levels/*.ccl $(DESTDIR)${COCO_LEVEL_DIRECTORY} ;\
+ install -m u=rw,go=r levels/*.cct $(DESTDIR)${COCO_LEVEL_DIRECTORY} ;\
+ install -m u=rw,go=r sounds/*.wav $(DESTDIR)${COCO_SOUND_DIRECTORY}
COCO_RPM_RELEASE=1
COCO_RPM_SPEC=copter-commander-${COCO_MAJOR_VERSION}.${COCO_MINOR_VERSION}-${COCO_RPM_RELEASE}.specalthough the second one looks like it just changes the install directory.
Last edited by fiddlinmacx (2011-06-24 14:36:19)
Offline
The second patch changes the makefile so it does work with a DESTDIR variable instead of the hardcoded paths.
I think that's a good idea.
the other patch changes things related to gnome and it should be tested if they are specific to mandriva/mageia or not.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
@Lone_Wolf
Thanks. Your right about the 1st patch. I'll have a closer look. It doesn't seem to make any difference when I try to get things to compile anyway. I'll keep looking.
@anybody -- please ;-)
If anyone can try this compile and has any ideas about what I should try next, it would be appreciated.
Offline
OK. I made some progress. If I recompile the oo-compiler.lisp file using
clisp -c oo-compiler.lispthe 'make' progresses. Now I get:
cc -Wall -O3 -I/usr/include \
-o tiff-compile tiff-compile.c -L/usr/lib -ltiff -lm
tiff-compile.c: In function ‘coco_write_raster_header’:
tiff-compile.c:103:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uint32’ [-Wformat]
tiff-compile.c:104:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uint32’ [-Wformat]
./tiff-compile tiffs `dirname rstr-rescue-raiders/rasters.h`
Compiling ".tiff"s to ".c"s.make: *** [rstr-rescue-raiders/rasters.h] Segmentation faultOffline