Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/pidgin-opensteamworks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEion Robb <eion@robbmob.com>2016-03-14 04:21:29 +0300
committerEion Robb <eion@robbmob.com>2016-03-14 04:21:29 +0300
commitaaa47152741d10c752a8580fe887ede5b7c8b341 (patch)
tree5b25245e0fa06370e6e9db9d261f5384f741f16a
parent5a5bebab831618b658ffdeb418b8b2e430a18dd4 (diff)
parent97e09fbf9fbbe7bf7241ff2ede16ebb72ade9870 (diff)
Merge pull request #139 from hasufell/master
Improve Makefile, fix OS detection in steam_rsa.c, minor compiler fix
-rw-r--r--steam-mobile/Makefile27
-rw-r--r--steam-mobile/steam_rsa.c4
2 files changed, 24 insertions, 7 deletions
diff --git a/steam-mobile/Makefile b/steam-mobile/Makefile
index 3f66ee1..ccf880d 100644
--- a/steam-mobile/Makefile
+++ b/steam-mobile/Makefile
@@ -21,14 +21,23 @@ ifeq ($(STEAM_CRYPT_BACKEND), nss)
else ifeq ($(STEAM_CRYPT_BACKEND), gcrypt)
LIBPURPLE_CFLAGS += $(shell libgcrypt-config --cflags) -DUSE_GCRYPT_CRYPTO
LIBPURPLE_LIBS += $(shell libgcrypt-config --libs)
+else ifeq ($(STEAM_CRYPT_BACKEND), mbedtls)
+ LIBPURPLE_CFLAGS += -DUSE_MBEDTLS_CRYPTO
+ LIBPURPLE_LIBS += -lmbedtls -lmbedcrypto -lmbedx509
+else ifeq ($(STEAM_CRYPT_BACKEND), openssl)
+ LIBPURPLE_CFLAGS += $(shell ${PKG_CONFIG} --cflags openssl) -DUSE_OPENSSL_CRYPTO
+ LIBPURPLE_LIBS += $(shell ${PKG_CONFIG} --libs openssl)
endif
STEAM_SOURCES = \
steam_connection.c \
- libsteam.c
+ libsteam.c
+
+STEAM_OBJS = $(patsubst %.c, %.o, $(STEAM_SOURCES))
+
-.PHONY: all clean install
all: libsteam.so
+
install:
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(PLUGIN_DIR_PURPLE)
install -m $(FILE_PERM) libsteam.so $(DESTDIR)$(PLUGIN_DIR_PURPLE)/$(PRPL_NAME)
@@ -38,8 +47,16 @@ install:
install -m $(FILE_PERM) steam22.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/22/steam.png
mkdir -m $(DIR_PERM) -p $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48
install -m $(FILE_PERM) steam48.png $(DESTDIR)$(DATA_ROOT_DIR_PURPLE)/pixmaps/pidgin/protocols/48/steam.png
+
clean:
- rm -f libsteam.so
+ rm -f libsteam.so *.o
+
+%.o: %.c
+ $(CC) -Wall -I. -fPIC $(LIBPURPLE_CFLAGS) $(CFLAGS) -c $*.c
+
+libsteam.so: $(STEAM_OBJS)
+ $(CC) -Wall -I. -fPIC $(LIBPURPLE_CFLAGS) $(CFLAGS) $(STEAM_OBJS) -o $@ $(LDFLAGS) $(LIBPURPLE_LIBS) -shared
+
+
+.PHONY: all clean install
-libsteam.so: $(STEAM_SOURCES)
- $(CC) -Wall -I. -fPIC $(CFLAGS) $(STEAM_SOURCES) -o $@ $(LIBPURPLE_CFLAGS) $(LIBPURPLE_LIBS) -shared
diff --git a/steam-mobile/steam_rsa.c b/steam-mobile/steam_rsa.c
index c14196e..03d757c 100644
--- a/steam-mobile/steam_rsa.c
+++ b/steam-mobile/steam_rsa.c
@@ -9,7 +9,7 @@ password=<base64rsaencryptedpwd>&username=<steamusername>&emailauth=&captchagid=
*/
-#if defined USE_OPENSSL_CRYPTO && !(defined __APPLE__ || defined __FreeBSD__ || defined __OpenBSD__)
+#if defined USE_OPENSSL_CRYPTO && !(defined __APPLE__ || defined __unix__)
# undef USE_OPENSSL_CRYPTO
#endif
@@ -561,7 +561,7 @@ steam_encrypt_password(const gchar *modulus_str, const gchar *exponent_str, cons
{
unsigned long error_num = ERR_get_error();
char *error_str = ERR_error_string(error_num, NULL);
- purple_debug_error("steam", error_str);
+ purple_debug_error("steam", "%s", error_str);
RSA_free(rsa);
g_free(encrypted);
return NULL;