Skip to content

Commit 4c84682

Browse files
committedMay 4, 2025
initial commit mkcue 1.8
0 parents  commit 4c84682

File tree

3 files changed

+146
-0
lines changed

3 files changed

+146
-0
lines changed
 

‎.abf.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sources:
2+
mkcue_1.orig.tar.gz: d9a69718ba3d862b589588bdf61796f755200f9d
3+
mkcue_1-8.debian.tar.xz: 9b5219e051ce0a99c51afc35fd78791a8e8c469b

‎mkcue-1-8-fixes.patch

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
diff -urN mkcue-1.orig/diskid.cc mkcue-1.orig-fixes/diskid.cc
2+
--- mkcue-1.orig/diskid.cc 2004-10-23 03:19:22.000000000 +0100
3+
+++ mkcue-1.orig-fixes/diskid.cc 2025-05-03 20:36:21.928182396 +0100
4+
@@ -46,7 +46,7 @@
5+
{
6+
}
7+
8+
-void DiskId::ReportError(char *err)
9+
+void DiskId::ReportError(const char *err)
10+
{
11+
m_errorMsg = string(err);
12+
}
13+
diff -urN mkcue-1.orig/diskid.h mkcue-1.orig-fixes/diskid.h
14+
--- mkcue-1.orig/diskid.h 2004-10-23 03:19:22.000000000 +0100
15+
+++ mkcue-1.orig-fixes/diskid.h 2025-05-03 20:35:19.799509064 +0100
16+
@@ -28,8 +28,6 @@
17+
18+
#include <string>
19+
20+
-using namespace std;
21+
-
22+
//
23+
// platform specific stuff
24+
//
25+
@@ -83,7 +81,7 @@
26+
27+
// DiskId(void);
28+
29+
- void ReportError(char *err);
30+
+ void ReportError(const char *err);
31+
32+
// This function is OS dependent, and will be implemented by
33+
// one of the modules in the osdep dir.
34+
diff -urN mkcue-1.orig/GNUmakefile.in mkcue-1.orig-fixes/GNUmakefile.in
35+
--- mkcue-1.orig/GNUmakefile.in 2004-10-27 07:38:57.000000000 +0100
36+
+++ mkcue-1.orig-fixes/GNUmakefile.in 2025-05-03 20:35:14.391427642 +0100
37+
@@ -54,7 +54,7 @@
38+
all: mkcue
39+
40+
mkcue: mkcue.o mb.o
41+
- ${CXX} -o $@ mkcue.o mb.o
42+
+ ${CXX} -o $@ mkcue.o mb.o ${LDFLAGS}
43+
44+
clean:
45+
rm -f mkcue *.o
46+
diff -urN mkcue-1.orig/mkcue.cc mkcue-1.orig-fixes/mkcue.cc
47+
--- mkcue-1.orig/mkcue.cc 2004-10-27 07:20:30.000000000 +0100
48+
+++ mkcue-1.orig-fixes/mkcue.cc 2025-05-03 20:42:20.428107780 +0100
49+
@@ -12,8 +12,11 @@
50+
51+
#include "diskid.h"
52+
53+
+/* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439790 */
54+
+#define MSF_OFFSET 150
55+
+
56+
void
57+
-DiskId::ReportError(char *err)
58+
+DiskId::ReportError(const char *err)
59+
{
60+
fprintf(stderr, "%s\n", err);
61+
exit(2);
62+
@@ -58,12 +61,10 @@
63+
puts(" INDEX 01 00:00:00");
64+
65+
#define min(x, y) ((x) < (y) ? (x) : (y))
66+
- for (track = cdinfo.FirstTrack + 1;
67+
+ for (track = cdinfo.FirstTrack;
68+
track <= min(trackcount, cdinfo.LastTrack);
69+
track++) {
70+
- /* There is frequently (always?) an offset of 150 sectors, so
71+
- * subtract the first track's offset. */
72+
- cdinfo.FrameOffset[track] -= cdinfo.FrameOffset[1];
73+
+ cdinfo.FrameOffset[track] -= MSF_OFFSET;
74+
75+
minutes = seconds = sectors = 0;
76+
sectors = cdinfo.FrameOffset[track] % 75;
77+
@@ -76,6 +77,9 @@
78+
}
79+
80+
printf(" TRACK %02d AUDIO\n", track);
81+
+ if (track == 1 && cdinfo.FrameOffset[track] > 0) {
82+
+ printf(" INDEX 00 00:00:00\n");
83+
+ }
84+
printf(" INDEX 01 %02d:%02d:%02d\n", minutes, seconds, sectors);
85+
}
86+

‎mkcue.spec

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
%define oname mkcue-1
2+
3+
Name: mkcue
4+
Version: 1.8
5+
Release: 1
6+
License: LGPL-2.1-or-later
7+
Group: Sound/Utilities
8+
Summary: Generates cue sheets from a CD's TOC (Table Of Contents)
9+
URL: https://diplodocus.org/projects/audio/
10+
# Currently maintained at https://tracker.debian.org/pkg/mkcue
11+
Source0: https://httpredir.debian.org/debian/pool/main/m/mkcue/mkcue_1.orig.tar.gz
12+
Source1: https://httpredir.debian.org/debian/pool/main/m/mkcue/mkcue_1-8.debian.tar.xz
13+
# All the upstream mkcue_-1-8 patches rolled into one.
14+
Patch0: mkcue-1-8-fixes.patch
15+
16+
BuildRequires: autoconf automake slibtool
17+
BuildRequires: make
18+
Suggests: abcde
19+
20+
%description
21+
mkcue generates cue sheets from a CD's TOC (Table Of Contents).
22+
23+
It uses code borrowed from the MusicBrainz client library,
24+
and is thus released under the terms of the GNU GPL.
25+
26+
Usage is quite simple. By default, list all tracks from /dev/cdrom in
27+
the cue sheet. An optional device argument overrides /dev/cdrom.
28+
29+
The -t track-count option only lists up to track-count tracks in the cue
30+
sheet, which is handy for CDs with data tracks you want to ignore.
31+
32+
It is a perfect companion for abcde to generate backups of your audio CDs
33+
using the FLAC codec and the single track option.
34+
35+
%prep
36+
%setup -q -n %{oname}.orig -a1
37+
%autopatch -p1
38+
39+
%build
40+
export DESTDIR=%{buildroot}%{_bindir}
41+
%ifarch aarch64
42+
./configure --prefix=/usr --build=aarch64-unknown-linux-gnu
43+
%else
44+
./configure --prefix=/usr
45+
%endif
46+
%make_build all
47+
48+
%install
49+
export DESTDIR=%{buildroot}%{_bindir}
50+
export bindir=%{_bindir}
51+
install -D mkcue %{buildroot}%{_bindir}/mkcue
52+
53+
%files
54+
%{_bindir}/%{name}
55+
%doc README
56+
%doc debian/changelog
57+
%license COPYING debian/copyright

0 commit comments

Comments
 (0)
Please sign in to comment.