@echo "install -m 644 src/$(MAN1) $(DESTDIR)$(MANDIR1)/$(MAN1)"
@sed -e "s/VERSION/$(VERSION)/g" \
-e "s/DATE/`date +'%m %Y'`/g" \
+ -e "s/PROJECT_UCFIRST/$(PROJECT_UCFIRST)/g" \
-e "s/PROJECT/$(PROJECT)/g" < doc/$(MAN1) > $(DESTDIR)$(MANDIR1)/$(MAN1)
@chmod 644 $(DESTDIR)$(MANDIR1)/$(MAN1)
VERSION = 0.1.9
PROJECT = vimb
-PREFIX ?= /usr/local
-BINDIR ?= $(PREFIX)/bin
-MANDIR ?= $(PREFIX)/share/man
+PREFIX ?= /usr/local
+BINDIR ?= $(PREFIX)/bin
+MANDIR ?= $(PREFIX)/share/man
#----------------compile options---------------------
LIBS += $(GTK2LIBS)
endif
+# generate a first char upper case project name
+PROJECT_UCFIRST = $(shell echo '${PROJECT}' | sed 's/\([a-z]\)\([a-zA-Z0-9]*\)/\u\1\2/')
+
CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_XOPEN_SOURCE=500
-CPPFLAGS += -DPROJECT=\"${PROJECT}\"
+CPPFLAGS += -DPROJECT=\"${PROJECT}\" -DPROJECT_UCFIRST=\"${PROJECT_UCFIRST}\"
ifeq ($(USEGTK3), 1)
CPPFLAGS += -DHAS_GTK3
endif
.\" vim: ft=groff
.\" Process this file with
.\" groff -man -Tascii vimb.1
-.TH PROJECT 1 "DATE" "PROJECT/VERSION" "Vimb Manual"
+.TH PROJECT 1 "DATE" "PROJECT/VERSION" "PROJECT_UCFIRST Manual"
.SH NAME
PROJECT - Vim Browser - A modal web browser based on webkit thats inspired by
"set backgrounds=on",
"set sansfont=sens-serif",
"set seriffont=serif",
- "set useragent=vimb/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)",
+ "set useragent=" PROJECT "/" VERSION " (X11; Linux i686) AppleWebKit/535.22+ Compatible (Safari)",
"set stylesheet=on",
"set proxy=on",
"set cookie-timeout=4800",
#ifdef HAS_GTK3
gtk_window_set_has_resize_grip(GTK_WINDOW(gui->window), false);
#endif
- gtk_window_set_wmclass(GTK_WINDOW(gui->window), "vimb", "Vimb");
- gtk_window_set_role(GTK_WINDOW(gui->window), "Vimb");
+ gtk_window_set_wmclass(GTK_WINDOW(gui->window), PROJECT, PROJECT_UCFIRST);
+ gtk_window_set_role(GTK_WINDOW(gui->window), PROJECT_UCFIRST);
}
GdkGeometry hints = {10, 10};
gtk_window_set_default_size(GTK_WINDOW(gui->window), WIN_WIDTH, WIN_HEIGHT);
- gtk_window_set_title(GTK_WINDOW(gui->window), "vimb");
+ gtk_window_set_title(GTK_WINDOW(gui->window), PROJECT);
gtk_window_set_geometry_hints(GTK_WINDOW(gui->window), NULL, &hints, GDK_HINT_MIN_SIZE);
gtk_window_set_icon(GTK_WINDOW(gui->window), NULL);
- gtk_widget_set_name(GTK_WIDGET(gui->window), "vimb");
+ gtk_widget_set_name(GTK_WIDGET(gui->window), PROJECT);
/* Create a browser instance */
gui->webview = WEBKIT_WEB_VIEW(webkit_web_view_new());
} else {
path = webkit_download_get_suggested_filename(download);
if (!path) {
- path = "vimb_donwload";
+ path = PROJECT "-donwload";
}
file = util_build_path(path, vb.config.download_dir);
}
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
+#include "config.h"
#include <stdio.h>
#include "ctype.h"
#include "util.h"
char *util_get_config_dir(void)
{
- char *path = g_build_filename(g_get_user_config_dir(), "vimb", NULL);
+ char *path = g_build_filename(g_get_user_config_dir(), PROJECT, NULL);
util_create_dir_if_not_exists(path);
return path;
char *util_get_cache_dir(void)
{
- char *path = g_build_filename(g_get_user_cache_dir(), "vimb", NULL);
+ char *path = g_build_filename(g_get_user_cache_dir(), PROJECT, NULL);
util_create_dir_if_not_exists(path);
return path;