Package init

This commit is contained in:
dogsheng 2019-12-14 18:53:03 +08:00
parent 746acba207
commit 03fbe9b46b
9 changed files with 224 additions and 75 deletions

View File

@ -1,36 +0,0 @@
# cdrdao
#### Description
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,39 +0,0 @@
# cdrdao
#### 介绍
{**以下是码云平台说明,您可以替换此简介**
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN。专为开发者提供稳定、高效、安全的云端软件开发协作平台
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -0,0 +1,57 @@
diff -up wrk/pccts/antlr/fset2.c.wrk wrk/pccts/antlr/fset2.c
--- wrk/pccts/antlr/fset2.c.wrk 2013-12-05 11:33:33.561962126 +0100
+++ wrk/pccts/antlr/fset2.c 2013-12-05 11:33:52.009105807 +0100
@@ -2210,7 +2210,7 @@ void MR_backTraceReport()
if (p->ntype != nToken) continue;
tn=(TokNode *)p;
if (depth != 0) fprintf(stdout," ");
- fprintf(stdout,TerminalString(tn->token));
+ fprintf(stdout,"%s",TerminalString(tn->token));
depth++;
if (! MR_AmbAidMultiple) {
if (set_nil(tn->tset)) {
diff -up wrk/pccts/antlr/gen.c.wrk wrk/pccts/antlr/gen.c
--- wrk/pccts/antlr/gen.c.wrk 2013-12-05 11:26:36.384714088 +0100
+++ wrk/pccts/antlr/gen.c 2013-12-05 11:29:41.894158536 +0100
@@ -3866,7 +3866,7 @@ int file;
/* MR10 */ _gen(" * ");
/* MR10 */ for (i=0 ; i < Save_argc ; i++) {
/* MR10 */ _gen(" ");
-/* MR10 */ _gen(Save_argv[i]);
+/* MR10 */ _gen1("%s",Save_argv[i]);
/* MR10 */ };
_gen("\n");
_gen(" *\n");
diff -up wrk/pccts/antlr/lex.c.wrk wrk/pccts/antlr/lex.c
--- wrk/pccts/antlr/lex.c.wrk 2013-12-05 11:15:51.912722340 +0100
+++ wrk/pccts/antlr/lex.c 2013-12-05 11:19:04.039210441 +0100
@@ -706,7 +706,7 @@ FILE *output;
/* MR26 */ if (! (isalpha(*t) || isdigit(*t) || *t == '_' || *t == '$')) break;
/* MR26 */ }
/* MR26 */ }
-/* MR26 */ fprintf(output,strBetween(pSymbol, t, pSeparator));
+/* MR26 */ fprintf(output,"%s",strBetween(pSymbol, t, pSeparator));
*q = p;
return (*pSeparator == 0);
@@ -771,7 +771,7 @@ FILE *f;
&pValue,
&pSeparator,
&nest);
- fprintf(f,strBetween(pDataType, pSymbol, pSeparator));
+ fprintf(f,"%s",strBetween(pDataType, pSymbol, pSeparator));
}
/* check to see if string e is a word in string s */
@@ -852,9 +852,9 @@ int i;
&pSeparator,
&nest);
fprintf(f,"\t");
- fprintf(f,strBetween(pDataType, pSymbol, pSeparator));
+ fprintf(f,"%s",strBetween(pDataType, pSymbol, pSeparator));
fprintf(f," ");
- fprintf(f,strBetween(pSymbol, pEqualSign, pSeparator));
+ fprintf(f,"%s",strBetween(pSymbol, pEqualSign, pSeparator));
fprintf(f,";\n");
}
fprintf(f,"};\n");

View File

@ -0,0 +1,52 @@
diff -up cdrdao-1.2.3/dao/cdrdao.man.helpmansync cdrdao-1.2.3/dao/cdrdao.man
--- cdrdao-1.2.3/dao/cdrdao.man.helpmansync 2012-10-08 15:54:01.598543254 +0200
+++ cdrdao-1.2.3/dao/cdrdao.man 2012-10-08 16:01:11.439957988 +0200
@@ -3,7 +3,7 @@
cdrdao \- reads and writes CDs in disc-at-once mode
.SH SYNOPSIS
.B cdrdao
-.RB { show-toc|read-toc|read-cd|read-cddb|show-data|read-test|disk-info|msinfo|unlock|simulate|write|copy|blank }
+.RB { show-toc|toc-info|toc-size|read-toc|read-cd|read-cddb|show-data|read-test|disk-info|discid|msinfo|drive-info|unlock|scanbus|simulate|write|copy|blank }
.RB [ --device
.IR device ]
.RB [ --source-device
@@ -77,6 +77,12 @@ The first argument must be one of the fo
.BI show-toc
Print out a summary about what will be written to the CD-R.
.TP
+.BI toc-info
+Prints out short toc-file summary.
+.TP
+.BI toc-size
+Prints total number of blocks for toc.
+.TP
.BI read-toc
Analyze each track of the inserted CD and create a
.I toc-file
@@ -122,10 +128,16 @@ Shows information about the inserted CD-
it will also print the start of the last and current session which is
used by mkisofs to create an image for a second or higher session.
.TP
+.BI discid
+Prints out CDDB information.
+.TP
.BI msinfo
Shows information required for creating multi session disks with
mkisofs. The output is meant for processing by scripts.
.TP
+.BI drive-info
+Shows drive information.
+.TP
.BI unlock
Tries to unlock the recorder device after a failed write or simulation
run. If you cannot eject the CD after a cdrdao run try this command.
@@ -139,6 +151,9 @@ blanking operation. Use option
.BI --speed
to select another blanking speed.
.TP
+.BI scanbus
+Scan for devices.
+.TP
.BI simulate
Like
.BI write

View File

@ -0,0 +1,24 @@
--- a/utils/toc2mp3.cc
+++ b/utils/toc2mp3.cc
@@ -143,8 +143,8 @@
message(0, "LAME encoder version: %s", get_lame_version());
message(0, "Supported bit rates: ");
- for (int i = 0; i < 16 && bitrate_table[1][i] >= 0; i++) {
- message(0, "%d ", bitrate_table[1][i]);
+ for (int i = 0; i < 16 && lame_get_bitrate(1, i) >= 0; i++) {
+ message(0, "%d ", lame_get_bitrate(1, i));
}
message(0, "");
}
@@ -238,8 +238,8 @@
lame_global_flags *lf;
int bitrateOk = 0;
- for (int i = 0; bitrate_table[1][i] >= 0 && !bitrateOk; i++) {
- if (bitrate == bitrate_table[1][i])
+ for (int i = 0; lame_get_bitrate(1, i) >= 0 && !bitrateOk; i++) {
+ if (bitrate == lame_get_bitrate(1, i))
bitrateOk = 1;
}

View File

@ -0,0 +1,24 @@
diff -up wrk/dao/CdrDriver.cc.wrk wrk/dao/CdrDriver.cc
--- wrk/dao/CdrDriver.cc.wrk 2016-02-16 14:06:23.158392345 +0100
+++ wrk/dao/CdrDriver.cc 2016-02-16 14:07:11.654597254 +0100
@@ -495,7 +495,7 @@ unsigned char CdrDriver::syncPattern[12]
0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0
};
-char CdrDriver::REMOTE_MSG_SYNC_[4] = { 0xff, 0x00, 0xff, 0x00 };
+unsigned char CdrDriver::REMOTE_MSG_SYNC_[4] = { 0xff, 0x00, 0xff, 0x00 };
/* Maps a string to the corresponding driver option value
diff -up wrk/dao/CdrDriver.h.wrk wrk/dao/CdrDriver.h
--- wrk/dao/CdrDriver.h.wrk 2016-02-16 14:21:18.454174199 +0100
+++ wrk/dao/CdrDriver.h 2016-02-16 14:21:42.381275268 +0100
@@ -440,7 +440,7 @@ protected:
bool fullBurn_;
static unsigned char syncPattern[12];
- static char REMOTE_MSG_SYNC_[4];
+ static unsigned char REMOTE_MSG_SYNC_[4];
static int speed2Mult(int);
static int mult2Speed(int);

13
cdrdao-1.2.3-stat.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up cdrdao-1.2.3/dao/ScsiIf-linux.cc.stat cdrdao-1.2.3/dao/ScsiIf-linux.cc
--- cdrdao-1.2.3/dao/ScsiIf-linux.cc.stat 2010-01-20 20:11:36.000000000 +0100
+++ cdrdao-1.2.3/dao/ScsiIf-linux.cc 2010-01-20 20:14:07.000000000 +0100
@@ -19,6 +19,9 @@
#include <config.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>

BIN
cdrdao-1.2.3.tar.bz2 Normal file

Binary file not shown.

54
cdrdao.spec Normal file
View File

@ -0,0 +1,54 @@
Summary: Records audio or data CD-Rs in disk-at-once (DAO) mode
Name: cdrdao
Version: 1.2.3
Release: 35
License: GPLv2+
URL: http://cdrdao.sourceforge.net/
Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
BuildRequires: gcc-c++ gcc libsigc++20-devel libao-devel
BuildRequires: libvorbis-devel >= 1.0 libmad-devel
BuildRequires: lame-devel autoconf GConf2-devel
Patch1: cdrdao-1.2.3-stat.patch
Patch2: cdrdao-1.2.3-helpmansync.patch
Patch3: cdrdao-1.2.3-format_security.patch
Patch4: cdrdao-1.2.3-narrowing.patch
Patch5: cdrdao-1.2.3-lame-3.100.patch
%description
Cdrdao records audio or data CD-Rs in disk-at-once (DAO) mode based
on a textual description of the CD contents (toc-file).
%package_help
%prep
%autosetup -p 1
%build
autoreconf -v -f -i -I.
%configure --without-xdao --without-scglib --with-ogg-support --with-mp3-support --with-lame
%make_build
%install
%make_install
%delete_la
%files
%license COPYING
%{_bindir}/cdrdao
%{_bindir}/cue2toc
%{_bindir}/toc2cddb
%{_bindir}/toc2cue
%{_bindir}/toc2mp3
%{_datadir}/cdrdao
%files help
%doc AUTHORS README CREDITS ChangeLog
%{_mandir}/man1
%changelog
* Tue Nov 19 2019 mengxian <mengxian@huawei.com> - 1.2.3-35
- Package init