Permalink
Browse files

Option to select keyring name

  • Loading branch information...
aebrahim committed Aug 6, 2014
1 parent fcec00c commit b4b4462f7967df9e72de47775adb5f7e89b83404
Showing with 34 additions and 17 deletions.
  1. +1 −0 .gitignore
  2. +2 −4 Makefile
  3. +3 −3 deb_control
  4. +15 −0 deb_rules
  5. +8 −5 gnome-keyring.c
  6. +5 −5 make_package.py
View
@@ -0,0 +1 @@
gnome-keyring.so
View
@@ -2,13 +2,11 @@ TARGET = gnome-keyring
KEYRINGFLAGS = `pkg-config --libs --cflags gnome-keyring-1`
PURPLEFLAGS = `pkg-config --cflags purple`
VERSION = `git describe --tags`
VERSION = $(shell cat VERSION)
ifeq ($(strip $(VERSION)),)
VERSION = `cat VERSION`
echo $(VERSION)
VERSION = `git describe --tags`
endif
all: ${TARGET}.so
clean:
View
@@ -2,10 +2,10 @@ Source: pidgin-gnome-keyring
Section: universe/net
Priority: optional
Maintainer: Ali Ebrahim <ali.ebrahim314@gmail.com>
Build-Depends: debhelper (>= 7.0.50~), pkg-config, libgnome-keyring-dev, libpurple-dev
Standards-Version: 3.9.1
Build-Depends: debhelper (>= 9), pkg-config, libgnome-keyring-dev, libpurple-dev
Standards-Version: 3.9.5
Homepage: https://github.com/aebrahim/pidgin-gnome-keyring/
Vcs-git: git@github.com:aebrahim/pidgin-gnome-keyring
Vcs-git: https://github.com/aebrahim/pidgin-gnome-keyring.git
Vcs-Browser: https://github.com/aebrahim/pidgin-gnome-keyring/
Package: pidgin-gnome-keyring
View
@@ -0,0 +1,15 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
%:
dh $@
override_dh_auto_install:
echo "skip auto install"
View
@@ -15,7 +15,6 @@
#include <glib.h>
#include <string.h>
/* function prototypes */
static void keyring_password_store(PurpleAccount *account, char *password);
static void sign_in_cb(PurpleAccount *account, gpointer data);
@@ -148,7 +147,7 @@ static void keyring_password_store(PurpleAccount *account,
char *password) {
gnome_keyring_store_password(
GNOME_KEYRING_NETWORK_PASSWORD,
GNOME_KEYRING_DEFAULT,
purple_prefs_get_string("/plugins/core/gnome-keyring/keyring_name"),
"pidgin account password",
password, keyring_password_store_cb,
account, NULL,
@@ -211,13 +210,16 @@ static PurplePluginUiInfo prefs_info = {
static PurplePluginPrefFrame * get_pref_frame(PurplePlugin *plugin) {
PurplePluginPrefFrame *frame = purple_plugin_pref_frame_new();
gchar *label = g_strdup_printf("Should passwords be wiped from pidgin's"
" memory?\nNote: enabling this setting might break things,\n"
"as some functions might need the password to be in memory.");
gchar *label = g_strdup_printf("Clear plaintext passwords from memory");
PurplePluginPref *pref = purple_plugin_pref_new_with_name_and_label(
"/plugins/core/gnome-keyring/clear_memory",
label);
purple_plugin_pref_frame_add(frame, pref);
purple_plugin_pref_frame_add(frame,
purple_plugin_pref_new_with_name_and_label(
"/plugins/core/gnome-keyring/keyring_name", "Keyring name"
)
);
return frame;
}
@@ -254,6 +256,7 @@ static PurplePluginInfo info = {
static void init_plugin(PurplePlugin *plugin) {
purple_prefs_add_none("/plugins/core/gnome-keyring");
purple_prefs_add_bool("/plugins/core/gnome-keyring/clear_memory", FALSE);
purple_prefs_add_string("/plugins/core/gnome-keyring/keyring_name", GNOME_KEYRING_DEFAULT);
}
PURPLE_INIT_PLUGIN(gnome-keyring, init_plugin, info)
View
@@ -9,7 +9,7 @@
import time
# declare strings up here
ubuntunames = ["lucid", "natty", "oneiric", "precise", "quantal", "raring", "saucy"]
ubuntunames = ["lucid", "precise", "quantal", "saucy", "trusty", "utopic"]
author_name = "Ali Ebrahim"
email = "ali.ebrahim314@gmail.com"
basename = "pidgin-gnome-keyring"
@@ -39,14 +39,15 @@
#shutil.make_archive(tarname, "gztar", root_dir=dirname)
# run dh_make
os.system("cd %s; dh_make -m -c gpl2 --createorig -y -a" %dirname)
os.system("cd %s; dh_make -s -c gpl2 --createorig -y -a -e %s" % (dirname, email))
# remove extra files and copy source files
os.system("cd %s; rm -rf *.ex *.EX README*" %debname)
shutil.copy2("deb_control", debname+"control")
shutil.copy2("deb_copyright", debname+"copyright")
shutil.copy2("deb_rules", debname+"rules")
# make the dirs and install files
os.system("echo '%s' > %sdirs" %(installdir, debname))
os.system("echo 'debian/../gnome-keyring.so %s' > %sinstall" \
os.system("echo 'gnome-keyring.so %s' > %sinstall" \
%(installdir, debname))
# write the changelog
changelog = open(debname + "changelog", "w")
@@ -62,6 +63,5 @@
changelog.write(" -- %s <%s> %s %s\n" % (author_name, email, date, offset))
changelog.close()
# call debuild
os.system("cd %s; debuild -S" % dirname)
os.system("cd %s; debuild -S -sa" % dirname)

0 comments on commit b4b4462

Please sign in to comment.