-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
336 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,18 +6,16 @@ dist_doc_DATA = README | |
|
||
dist_man_MANS = mentohust.1 | ||
|
||
SPEC = mentohust.spec | ||
EXTRA_DIST = @PACKAGE_NAME@.spec.in m4 debian/changelog debian/compat debian/control debian/copyright debian/rules debian/watch | ||
|
||
EXTRA_DIST = $(SPEC) debian/changelog debian/compat debian/control debian/copyright debian/rules debian/watch | ||
|
||
rpm: dist-gzip | ||
mkdir -p ~/rpmbuild/SOURCES/ | ||
mv mentohust-*.tar.gz ~/rpmbuild/SOURCES/ | ||
if [ -z "$(TARGET)" ] ;then \ | ||
rpmbuild -bb $(top_srcdir)/$(SPEC) ; \ | ||
else rpmbuild -bb $(top_srcdir)/$(SPEC) --target=$(TARGET) ; fi | ||
mv ~/rpmbuild/RPMS/*$(TARGET)/mentohust-*$(TARGET).rpm ./ | ||
rm ~/rpmbuild/SOURCES/mentohust* | ||
rpm: dist @[email protected] | ||
rpmbuild -bb \ | ||
--define "_sourcedir `pwd`" \ | ||
--define "_builddir `pwd`" \ | ||
--define "_specdir `pwd`" \ | ||
--define "_rpmdir `pwd`" \ | ||
--define "_srcrpmdir `pwd`" \ | ||
@[email protected] | ||
|
||
deb: debian/rules | ||
dpkg-buildpackage -rfakeroot -uc -b -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
zh_CN | ||
|
||
en |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
# List of source files which contain translatable strings. | ||
src/dlfunc.c | ||
src/mentohust.c | ||
src/mycheck.c | ||
src/myconfig.c | ||
src/myfunc.c | ||
src/myini.c | ||
src/mystate.c |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,8 @@ | |
* 邮 箱:[email protected] | ||
* 日 期:2009.11.11 | ||
*/ | ||
|
||
#ifdef HAVE_CONFIG_H | ||
#include "config.h" | ||
#endif | ||
|
||
#include "i18n.h" | ||
#include "dlfunc.h" | ||
#include "i18n.h" | ||
|
||
#ifndef NO_DYLOAD | ||
#include <dlfcn.h> | ||
|
@@ -47,7 +42,7 @@ int load_libpcap(void) { | |
error = dlerror(); | ||
} | ||
if (libpcap == NULL) { | ||
printf("!! 打开libpcap失败,请检查是否已安装该库文件。\n"); | ||
printf(_("!! 打开libpcap失败,请检查是否已安装该库文件。\n")); | ||
return -1; | ||
} | ||
if ((pcap_findalldevs = dlsym(libpcap, "pcap_findalldevs"), error = dlerror()) != NULL | ||
|
@@ -61,7 +56,7 @@ int load_libpcap(void) { | |
|| (pcap_close = dlsym(libpcap, "pcap_close"), error = dlerror()) != NULL | ||
|| (pcap_breakloop = dlsym(libpcap, "pcap_breakloop"), error = dlerror()) != NULL | ||
|| (pcap_sendpacket = dlsym(libpcap, "pcap_sendpacket"), error = dlerror()) != NULL) { | ||
printf("!! 从libpcap获取函数失败: %s\n", error); | ||
printf(_("!! 从libpcap获取函数失败: %s\n"), error); | ||
free_libpcap(); | ||
return -1; | ||
} | ||
|
@@ -110,20 +105,20 @@ int load_libnotify(void) { | |
error = dlerror(); | ||
} | ||
if (libnotify == NULL) { | ||
printf("!! 打开libnotify失败,请检查是否已安装该库文件。\n"); | ||
printf(_("!! 打开libnotify失败,请检查是否已安装该库文件。\n")); | ||
return -1; | ||
} | ||
if ((notify_init = dlsym(libnotify, "notify_init"), error = dlerror()) != NULL | ||
|| (notify_notification_new = dlsym(libnotify, "notify_notification_new"), error = dlerror()) != NULL | ||
|| (notify_notification_show = dlsym(libnotify, "notify_notification_show"), error = dlerror()) != NULL | ||
|| (notify_notification_update = dlsym(libnotify, "notify_notification_update"), error = dlerror()) != NULL | ||
|| (notify_notification_set_timeout = dlsym(libnotify, "notify_notification_set_timeout"), error = dlerror()) != NULL) { | ||
printf("!! 从libnotify获取函数失败: %s\n", error); | ||
printf(_("!! 从libnotify获取函数失败: %s\n"), error); | ||
free_libnotify(); | ||
return -1; | ||
} | ||
if (!notify_init("mentohust")) { | ||
printf("!! 初始化libnotify失败。\n"); | ||
printf(_("!! 初始化libnotify失败。\n")); | ||
free_libnotify(); | ||
return -1; | ||
} | ||
|
@@ -156,4 +151,3 @@ void show_notify(const char *summary, char *body) { | |
} | ||
|
||
#endif /* NO_NOTIFY */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.