|
- # Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
- pkgname=sopcast
- pkgver=0.9.7
- pkgrel=1
- pkgdesc="Sopcast is the Streaming Direct Broadcast System based on P2P"
- url="http://www.sopcast.org"
- depends=(libstdc++5)
- source=(http://download.sopcast.org/download/sp-sc.tgz)
- md5sums=('abf159c117a13111f22030674e2fa018')
- build() {
- mkdir -p $startdir/pkg/usr/bin
- mv sp-sc/sp-sc $startdir/pkg/usr/bin
- }
复制代码 先装sopcast,然后装gsopcast
PKGBUILD
- #Maintainer: artofegg <zhanglin22000@gmail.com>
- pkgname=gsopcast
- pkgver=0.2.8
- pkgrel=1
- pkgdesc="sopcast gtk front"
- url="http://lianwei3.googlepages.com/home2/"
- license="GPL"
- depends=('sopcast')
- makedepends=()
- conflicts=()
- replaces=()
- backup=()
- install=
- source=( http://freeegg.512j.com/gsopcast-0.2.8.tar.bz2 \
- gsopcast-0.2.8-Chinese.patch \
- gtk-sopcast.desktop
- )
- md5sums=('15bb3d6fa72dd3cae2ee28dca6bc665b' 'a303ef8ab330289376e73ec0dec764a7')
- build() {
- cd $startdir/src/$pkgname-$pkgver
- patch -p1 < ../../gsopcast-0.2.8-Chinese.patch
- cd $startdir/src/$pkgname-$pkgver/src
- make || return 1
- install -D gsopcast $startdir/pkg/usr/bin/gsopcast
- mkdir -p $startdir/pkg/opt/kde/share/applnk/Multimedia/
- cp -f $startdir/gtk-sopcast.desktop $startdir/pkg/opt/kde/share/applnk/Multimedia/
- }
复制代码 gsopcast-0.2.8-Chinese.patch 中文补丁
- --- gsopcast-0.2.8/src/callbacks.cc 2006-08-19 11:33:29.000000000 +0800
- +++ gsopcast-0.2.8/src/callbacks.cc.new 2006-08-27 17:02:05.000000000 +0800
- @@ -83,7 +83,7 @@
- if (ptimer_record != 0)
- g_source_remove (ptimer_record);
- ////set record label to default
- - gtk_label_set_text (GTK_LABEL (label_record), "Record");
- + gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
- gtk_entry_set_text (GTK_ENTRY (entry_status), "");
- ////set record color to default
- GdkColor color;
- @@ -282,14 +282,14 @@
- on_button_expand_clicked (GtkWidget * widget)
- {
- gboolean flag = TRUE;
- - if (strcmp (gtk_button_get_label (GTK_BUTTON (widget)), "Expand") == 0)
- + if (strcmp (gtk_button_get_label (GTK_BUTTON (widget)), "全部展开") == 0)
- {
- - gtk_button_set_label (GTK_BUTTON (widget), "Collap");
- + gtk_button_set_label (GTK_BUTTON (widget), "全部折叠");
- flag = TRUE;
- }
- - else if (strcmp (gtk_button_get_label (GTK_BUTTON (widget)), "Collap") == 0)
- + else if (strcmp (gtk_button_get_label (GTK_BUTTON (widget)), "全部折叠") == 0)
- {
- - gtk_button_set_label (GTK_BUTTON (widget), "Expand");
- + gtk_button_set_label (GTK_BUTTON (widget), "全部展开");
- flag = FALSE;
- }
-
- @@ -370,7 +370,7 @@
- if (ptimer_record != 0)
- g_source_remove (ptimer_record);
- ////set record label to default
- - gtk_label_set_text (GTK_LABEL (label_record), "Record");
- + gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
- gtk_entry_set_text (GTK_ENTRY (entry_status), "");
- ////set record color to default
- GdkColor color;
- @@ -439,14 +439,14 @@
- void
- on_button_record_clicked (GtkWidget * widget, gpointer data)
- {
- - if (strcmp (gtk_label_get_text (GTK_LABEL (label_record)), "Record") == 0)
- + if (strcmp (gtk_label_get_text (GTK_LABEL (label_record)), "开始录制") == 0)
- {
- ptimer_record = g_timeout_add (1000, launch_record, NULL);
-
- - gtk_label_set_text (GTK_LABEL (label_record), "|Quit|");
- + gtk_label_set_text (GTK_LABEL (label_record), "停止录制");
-
- }
- - else if (strcmp (gtk_label_get_text (GTK_LABEL (label_record)), "|Quit|") ==
- + else if (strcmp (gtk_label_get_text (GTK_LABEL (label_record)), "停止录制") ==
- 0)
- {
- ///close record_fp
- @@ -464,7 +464,7 @@
- if (ptimer_record != 0)
- g_source_remove (ptimer_record);
-
- - gtk_label_set_text (GTK_LABEL (label_record), "Record");
- + gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
- ////set record color to default
- GdkColor color;
- gdk_color_parse ("black", &color);
- --- gsopcast-0.2.8/src/iorecord.cc 2006-08-19 12:38:18.000000000 +0800
- +++ gsopcast-0.2.8/src/iorecord.cc.new 2006-08-27 16:59:24.000000000 +0800
- @@ -56,7 +56,7 @@
- fprintf (stderr, "err while parseing head\n");
- ///close socket
- close (socket_fd);
- - gtk_label_set_text (GTK_LABEL (label_record), "Record");
- + gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
-
- return FALSE;
- }
- @@ -96,7 +96,7 @@
- if (record_fp == NULL)
- {
- perror ("record path is invalid");
- - gtk_label_set_text (GTK_LABEL (label_record), "Record");
- + gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
- close (socket_fd);
- return FALSE;
- }
- @@ -112,7 +112,7 @@
- fclose (record_fp);
- record_fp = NULL;
- }
- - gtk_label_set_text (GTK_LABEL (label_record), "Record");
- + gtk_label_set_text (GTK_LABEL (label_record), "开始录制");
- close (socket_fd);
- return FALSE;
- }
- --- gsopcast-0.2.8/src/iostatistics.cc 2006-08-19 11:33:29.000000000 +0800
- +++ gsopcast-0.2.8/src/iostatistics.cc.new 2006-08-27 17:04:42.000000000 +0800
- @@ -45,7 +45,7 @@
- {
- ///show state
- char status[64];
- - sprintf (status, "Connecting %s",
- + sprintf (status, "正在连接 %s",
- elapsed_seconds % 4 ? ((elapsed_seconds % 4) %
- 3 ? (((elapsed_seconds % 4) % 3) %
- 2 ? "." : "..") : "...") : " ");
- --- gsopcast-0.2.8/src/loadsave.cc 2006-08-19 11:33:29.000000000 +0800
- +++ gsopcast-0.2.8/src/loadsave.cc.new 2006-08-27 17:11:14.000000000 +0800
- @@ -43,7 +43,7 @@
- strcat (record_dir, "/SOPCAST/");
- int width = 350, height = 450;
- gtk_entry_set_text (GTK_ENTRY (entry_player),
- - "mplayer -ontop -geometry 100%:100%");
- + "kaffeine");
- gtk_entry_set_text (GTK_ENTRY (entry_url), channels_url);
- gtk_entry_set_text (GTK_ENTRY (entry_url_header), channels_url_header);
- gtk_entry_set_text (GTK_ENTRY (entry_record_dir), record_dir);
- --- gsopcast-0.2.8/src/main.cc 2006-08-19 17:28:57.000000000 +0800
- +++ gsopcast-0.2.8/src/main.cc.new 2006-08-27 17:22:02.000000000 +0800
- @@ -133,7 +133,7 @@
-
- //Name
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("name",
- + column = gtk_tree_view_column_new_with_attributes ("名称",
- renderer,
- "text", NAME_COLUMN,
- NULL);
- @@ -145,7 +145,7 @@
-
- //user
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("user",
- + column = gtk_tree_view_column_new_with_attributes ("用户",
- renderer,
- "text", USER_COLUMN,
- NULL);
- @@ -155,7 +155,7 @@
-
- //visit
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("visit",
- + column = gtk_tree_view_column_new_with_attributes ("访问",
- renderer,
- "text", VISIT_COLUMN,
- NULL);
- @@ -165,7 +165,7 @@
-
- //Kbps
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("kbps",
- + column = gtk_tree_view_column_new_with_attributes ("速率(kb/s)",
- renderer,
- "text", KBPS_COLUMN,
- NULL);
- @@ -175,7 +175,7 @@
-
- //qs
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("qs",
- + column = gtk_tree_view_column_new_with_attributes ("服务质量",
- renderer,
- "text", QS_COLUMN, NULL);
- gtk_tree_view_column_set_resizable (column, TRUE);
- @@ -184,7 +184,7 @@
-
- //qc
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("qc",
- + column = gtk_tree_view_column_new_with_attributes ("网络质量",
- renderer,
- "text", QC_COLUMN, NULL);
- gtk_tree_view_column_set_resizable (column, TRUE);
- @@ -193,7 +193,7 @@
-
- //start from
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("start__from",
- + column = gtk_tree_view_column_new_with_attributes ("开始于",
- renderer,
- "text", START_COLUMN,
- NULL);
- @@ -203,7 +203,7 @@
-
- //stream type
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("type",
- + column = gtk_tree_view_column_new_with_attributes ("类型",
- renderer,
- "text", STREAM_COLUMN,
- NULL);
- @@ -213,7 +213,7 @@
-
- //Status
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("status",
- + column = gtk_tree_view_column_new_with_attributes ("状态",
- renderer,
- "text", STATUS_COLUMN,
- NULL);
- @@ -223,7 +223,7 @@
-
- //URL
- renderer = gtk_cell_renderer_text_new ();
- - column = gtk_tree_view_column_new_with_attributes ("sop__address",
- + column = gtk_tree_view_column_new_with_attributes ("sop地址",
- renderer,
- "text", URL_COLUMN,
- NULL);
- @@ -278,7 +278,7 @@
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
-
- - button_channel = gtk_toggle_button_new_with_label ("Channel");
- + button_channel = gtk_toggle_button_new_with_label ("更新频道");
- gtk_box_pack_start (GTK_BOX (hbox), button_channel, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button_channel), GTK_RELIEF_NONE);
- gtk_button_set_focus_on_click (GTK_BUTTON (button_channel), FALSE);
- @@ -290,14 +290,14 @@
- g_signal_connect (G_OBJECT (entry_search), "activate",
- G_CALLBACK (on_entry_search_activated), NULL);
-
- - button = gtk_button_new_with_label ("Search");
- + button = gtk_button_new_with_label ("搜索");
- gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
- g_signal_connect (G_OBJECT (button), "clicked",
- G_CALLBACK (on_button_search_clicked), NULL);
-
- - button_expand = gtk_button_new_with_label ("Expand");
- + button_expand = gtk_button_new_with_label ("全部展开");
- gtk_box_pack_start (GTK_BOX (hbox), button_expand, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button_expand), GTK_RELIEF_NONE);
- gtk_button_set_focus_on_click (GTK_BUTTON (button_expand), FALSE);
- @@ -342,7 +342,7 @@
- g_signal_connect (G_OBJECT (combo->entry), "changed",
- G_CALLBACK (on_combo_changed), NULL);*/
-
- - button = gtk_button_new_with_label ("Launch");
- + button = gtk_button_new_with_label ("载入");
- gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
- gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);
- @@ -356,7 +356,7 @@
-
-
- button_player = gtk_button_new ();
- - label_player = gtk_label_new ("Player");
- + label_player = gtk_label_new ("重启播放器");
- gtk_container_add (GTK_CONTAINER (button_player), label_player);
- gtk_box_pack_start (GTK_BOX (hbox), button_player, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button_player), GTK_RELIEF_NONE);
- @@ -365,7 +365,7 @@
- G_CALLBACK (on_button_player_clicked), NULL);
-
-
- - button_stop = gtk_button_new_with_label ("Stop");
- + button_stop = gtk_button_new_with_label ("断开");
- gtk_box_pack_start (GTK_BOX (hbox), button_stop, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button_stop), GTK_RELIEF_NONE);
- gtk_button_set_focus_on_click (GTK_BUTTON (button_stop), FALSE);
- @@ -373,7 +373,7 @@
- G_CALLBACK (on_button_stop_clicked), NULL);
-
-
- - button_exit = gtk_button_new_with_label ("Exit");
- + button_exit = gtk_button_new_with_label ("退出");
- gtk_box_pack_start (GTK_BOX (hbox), button_exit, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button_exit), GTK_RELIEF_NONE);
- gtk_button_set_focus_on_click (GTK_BUTTON (button_exit), FALSE);
- @@ -400,7 +400,7 @@
- GTK_WIDGET_UNSET_FLAGS (hscale_sound, GTK_CAN_FOCUS);
-
- button_record = gtk_button_new ();
- - label_record = gtk_label_new ("Record");
- + label_record = gtk_label_new ("开始录制");
- gtk_container_add (GTK_CONTAINER (button_record), label_record);
- gtk_box_pack_start (GTK_BOX (hbox), button_record, FALSE, FALSE, 0);
- gtk_button_set_relief (GTK_BUTTON (button_record), GTK_RELIEF_NONE);
- @@ -425,13 +425,13 @@
- vbox = gtk_vbox_new (FALSE, 0);
- gtk_container_add (GTK_CONTAINER (notebook1), vbox);
- ////
- - label = gtk_label_new ("Configuration");
- + label = gtk_label_new ("配置页面");
- gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 0);
- ////
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- - label = gtk_label_new (" Player: ");
- + label = gtk_label_new (" 播放器:");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- entry_player = gtk_entry_new ();
- @@ -440,7 +440,7 @@
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- - label = gtk_label_new (" Channels url: ");
- + label = gtk_label_new (" 频道文件地址:");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- entry_url = gtk_entry_new ();
- @@ -450,7 +450,7 @@
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- - label = gtk_label_new (" Channels url header: ");
- + label = gtk_label_new (" 频道地址头格式:");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- entry_url_header = gtk_entry_new ();
- @@ -459,7 +459,7 @@
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- - label = gtk_label_new (" Record directory: ");
- + label = gtk_label_new (" 录制文件存放目录:");
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-
- entry_record_dir = gtk_entry_new ();
- @@ -468,13 +468,13 @@
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, FALSE, 0);
-
- - button_save = gtk_button_new_with_label (" Save ");
- + button_save = gtk_button_new_with_label (" 应用 ");
- gtk_box_pack_start (GTK_BOX (hbox), button_save, TRUE, FALSE, 0);
- g_signal_connect (G_OBJECT (button_save), "clicked",
- G_CALLBACK (on_button_save_clicked), NULL);
-
- ///
- - label = gtk_label_new ("config");
- + label = gtk_label_new ("配置");
- gtk_widget_set_sensitive (label, FALSE);
- gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK
- @@ -483,11 +483,11 @@
-
- label =
- gtk_label_new
- - ("version 0.2.8\n\ngsopcast: a gtk front-end to p2p TV sopcast\n(c)2005-2006 Wei Lian. All rights reserved.\nhttp://lianwei3.googlepages.com/home2\nBuilt on the work of pinkme005 and zlbruce");
- + ("版本 0.2.8\n\ngsopcast是 P2P 网络电视软件 sopcast 的一个 gtk 图形前端\n(c)2005-2006 Wei Lian. All rights reserved.\nhttp://lianwei3.googlepages.com/home2\n基于 pinkme005 和 zlbruce 所做的工作\n\n中文化:Subbo(Subbo@126.com)");
- gtk_container_add (GTK_CONTAINER (notebook1), label);
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
-
- - label = gtk_label_new ("about");
- + label = gtk_label_new ("关于");
- gtk_widget_set_sensitive (label, FALSE);
- gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1),
- gtk_notebook_get_nth_page (GTK_NOTEBOOK
复制代码
还有一个开始菜单的图标文件
gtk-sopcast.desktop
中文补丁是红旗的,pkgbuild是假定为kde桌面,gnome的兄弟稍微改一下
cp -f $startdir/gtk-sopcast.desktop $startdir/pkg/opt/kde/share/applnk/Multimedia/ |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|