Package Details: libayemu 1.0.0-1

Git Clone URL: https://aur.archlinux.org/libayemu.git (read-only, click to copy)
Package Base: libayemu
Description: AY/YM sound chip (from ZX-Spectrum) emulation library.
Upstream URL: http://sashnov.nm.ru/libayemu.html
Licenses: LGPLv2
Submitter: btimofeev
Maintainer: btimofeev
Last Packager: btimofeev
Votes: 2
Popularity: 0.000000
First Submitted: 2014-09-02 10:51 (UTC)
Last Updated: 2015-07-11 14:22 (UTC)

Latest Comments

psyomn commented on 2023-08-22 14:40 (UTC) (edited on 2023-08-22 14:41 (UTC) by psyomn)

Don't know if this will help someone, but I cloned and hacked this a little bit. My patch fetches libayemu from git, and applies some patches to ignore the "test", and "playvtx" binaries.

I've also added a pkg-config file.

My patch is like so:

From fb698b71257e9d4ca41e4e2afb384c2c394238af Mon Sep 17 00:00:00 2001
From: Simon Symeonidis <lethaljellybean@gmail.com>
Date: Tue, 22 Aug 2023 10:29:00 -0400
Subject: [PATCH] Fetch and build from github

This will not install playvtx
---
 0001-makefile.am-no-test-app-subdirs.patch | 32 +++++++++++++++++++
 PKGBUILD                                   | 37 +++++++++++++++++-----
 libayemu.pc                                | 10 ++++++
 3 files changed, 71 insertions(+), 8 deletions(-)
 create mode 100644 0001-makefile.am-no-test-app-subdirs.patch
 create mode 100644 libayemu.pc

diff --git a/0001-makefile.am-no-test-app-subdirs.patch b/0001-makefile.am-no-test-app-subdirs.patch
new file mode 100644
index 0000000..cf4780d
--- /dev/null
+++ b/0001-makefile.am-no-test-app-subdirs.patch
@@ -0,0 +1,32 @@
+From 8a81f1bae461499e2d0e9d1fa5b8e4949ce85298 Mon Sep 17 00:00:00 2001
+From: Simon Symeonidis <lethaljellybean@gmail.com>
+Date: Tue, 22 Aug 2023 10:16:33 -0400
+Subject: [PATCH] makefile.am: no test, app subdirs
+
+---
+ Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index fb365c2..c48b199 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,5 @@
+ ## Any directories that you want built and installed should go here.
+-SUBDIRS = include src test apps
++SUBDIRS = include src
+ 
+ ## Any directories you want a part of the distribution should be listed
+ ## here, as well as have a Makefile generated at the end of configure.in
+@@ -8,7 +8,7 @@ SUBDIRS = include src test apps
+ DIST_SUBDIRS = $(SUBDIRS) contrib music_sample
+ 
+ # All the rest of the distributed files
+-EXTRA_DIST = bootstrap 
++EXTRA_DIST = bootstrap
+ 
+ # Run ldconfig after installing the library:
+ install-exec-hook:
+-- 
+2.41.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 18dd2c7..388af15 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,43 @@
 #Mainteiner: Boris Timofeev <mashin87@gmail.com>
-pkgname=libayemu
+pkgname=libayemu-git
 pkgver=1.0.0
-pkgrel=1
-pkgdesc="AY/YM sound chip (from ZX-Spectrum) emulation library." 
+pkgrel=2
+pkgdesc="AY/YM sound chip (from ZX-Spectrum) emulation library."
 arch=('i686' 'x86_64')
 license=('LGPLv2')
-url="http://sashnov.nm.ru/libayemu.html"
-source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-md5sums=('548cf778170a982de8ebcb0880b5518c')
+url="https://asashnov.github.io/libayemu.html"
+source=(
+        'git+https://github.com/asashnov/libayemu#commit=8b0a83dcdfab5646b02af41b0117e2cb3b3810e4'
+        'libayemu.pc'
+        '0001-makefile.am-no-test-app-subdirs.patch'
+)
+sha256sums=(
+        'SKIP'
+        '9c96060fa12a7b52b5f7716d52fa173242b872d3c9df7d904b71933b1379283e'
+        '9d4f143dded7e9e78da34d14ed4073d888788c66105332199d0ab11f57b94d5a'
+)
+makedepends=('git' 'automake' 'autoconf' 'libtool')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+
+prepare() {
+        cd "$srcdir/${pkgname%-git}"
+        patch -i '../0001-makefile.am-no-test-app-subdirs.patch'
+}

 build() {
-  cd ${srcdir}/${pkgname}-${pkgver}
+  cd "${srcdir}/${pkgname%-git}"
+  ./bootstrap
   ./configure --prefix=/usr
   make
+
+  sed "s/@VERSION@/${pkgver}/g" -i "${srcdir}/libayemu.pc"
+  sed "s#@DESCRIPTION@#${pkgdesc}#g" -i "${srcdir}/libayemu.pc"
 }

 package() {
-  cd ${srcdir}/${pkgname}-${pkgver}
+  cd "${srcdir}/${pkgname%-git}"
   make DESTDIR="${pkgdir}" install
+  install -Dm644 ${srcdir}/libayemu.pc --target-directory=${pkgdir}/usr/lib/pkgconfig
 }

diff --git a/libayemu.pc b/libayemu.pc
new file mode 100644
index 0000000..2d9f671
--- /dev/null
+++ b/libayemu.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: libayemu
+Description: @DESCRIPTION@
+Version: @VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -layemu
-- 
2.41.0

This would be the result:

-rw-r--r-- root/root     70698 2023-08-22 10:27 .BUILDINFO
-rw-r--r-- root/root       728 2023-08-22 10:27 .MTREE
-rw-r--r-- root/root       453 2023-08-22 10:27 .PKGINFO
drwxr-xr-x root/root         0 2023-08-22 10:27 usr/
drwxr-xr-x root/root         0 2023-08-22 10:27 usr/include/
-rw-r--r-- root/root      2115 2023-08-22 10:27 usr/include/ayemu.h
-rw-r--r-- root/root      4630 2023-08-22 10:27 usr/include/ayemu_8912.h
-rw-r--r-- root/root      2011 2023-08-22 10:27 usr/include/ayemu_vtxfile.h
drwxr-xr-x root/root         0 2023-08-22 10:27 usr/lib/
lrwxrwxrwx root/root         0 2023-08-22 10:27 usr/lib/libayemu-1.1.0.so.0 -> libayemu-1.1.0.so.0.0.0
-rwxr-xr-x root/root     26712 2023-08-22 10:27 usr/lib/libayemu-1.1.0.so.0.0.0
lrwxrwxrwx root/root         0 2023-08-22 10:27 usr/lib/libayemu.so -> libayemu-1.1.0.so.0.0.0
drwxr-xr-x root/root         0 2023-08-22 10:27 usr/lib/pkgconfig/
-rw-r--r-- root/root       238 2023-08-22 10:27 usr/lib/pkgconfig/libayemu.pc

A project I'm working on can now detect libayemu:

-- Checking for module 'libayemu'
--   Found libayemu, version 1.0.0