[alsamixer-dockapp/f17] Initial import

Mario Blättermann mariobl at fedoraproject.org
Thu Oct 11 19:57:54 UTC 2012


commit ff0be799e875170e4beabeed13ba0d38a5b898c8
Author: Mario Blättermann <mario.blaettermann at gmail.com>
Date:   Thu Oct 11 21:58:45 2012 +0200

    Initial import

 .gitignore                    |    1 +
 alsamixer-dockapp-const.patch |   97 +++++++++++++++++++++++++++++++++++++++++
 alsamixer-dockapp.spec        |   50 +++++++++++++++++++++
 sources                       |    1 +
 4 files changed, 149 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4025f41 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/AlsaMixer.app-0.1.tar.gz
diff --git a/alsamixer-dockapp-const.patch b/alsamixer-dockapp-const.patch
new file mode 100644
index 0000000..8bb5624
--- /dev/null
+++ b/alsamixer-dockapp-const.patch
@@ -0,0 +1,97 @@
+diff --git Mixer.cc Mixer.cc
+--- Mixer.cc
++++ Mixer.cc
+@@ -66,10 +66,10 @@
+    Atom       deleteWindow;
+    Xpm*       image;
+    char*      displayName = NULL;
+-   char*      card = "default";
++   const char* card = "default";
+ 
+    mError = 0;
+-   mInstanceName = INSTANCENAME;
++   mInstanceName = const_cast<char*>(INSTANCENAME);
+    mVolumeSource[0] = -1;
+    mVolumeSource[1] = -1;
+    mVolumeSource[2] = -1;
+@@ -231,7 +231,7 @@
+ 
+    // Set classhint
+    classHint.res_name =  mInstanceName;
+-   classHint.res_class = CLASSNAME;
++   classHint.res_class = const_cast<char*>(CLASSNAME);
+    XSetClassHint(mDisplay, mAppWin, &classHint);
+ 
+    // Create delete atom
+diff --git Xpm.cc Xpm.cc
+--- Xpm.cc
++++ Xpm.cc
+@@ -30,14 +30,14 @@
+ 
+ using namespace std;
+ 
+-Xpm::Xpm(Display* display, Window root, char** data) 
++Xpm::Xpm(Display* display, Window root, const char** data) 
+ {
+    int error;
+ 
+    mDisplay = display;
+ 
+    mAttributes.valuemask = 0;
+-   error = XpmCreatePixmapFromData(mDisplay, root, data, &mImage, &mMask, &mAttributes);
++   error = XpmCreatePixmapFromData(mDisplay, root, const_cast<char**>(data), &mImage, &mMask, &mAttributes);
+ 
+    switch (error) {
+    case XpmColorError:
+diff --git Xpm.h Xpm.h
+--- Xpm.h
++++ Xpm.h
+@@ -28,7 +28,7 @@
+ class Xpm 
+ {
+ public:
+-   Xpm(Display* display, Window root, char** data);
++   Xpm(Display* display, Window root, const char** data);
+    virtual ~Xpm();
+    void setWindowPixmap(Window win);
+    void setWindowPixmapShaped(Window win);
+diff --git skins/default/button.xpm skins/default/button.xpm
+--- skins/default/button.xpm
++++ skins/default/button.xpm
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * button_xpm[] = {
++static const char * button_xpm[] = {
+ "16 9 17 1",
+ " 	c None",
+ ".	c #B7BAC7",
+diff --git skins/default/main.xpm skins/default/main.xpm
+--- skins/default/main.xpm
++++ skins/default/main.xpm
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * main_xpm[] = {
++static const char * main_xpm[] = {
+ "64 64 194 2",
+ "  	c None",
+ ". 	c #000000",
+diff --git skins/default/mutebutton.xpm skins/default/mutebutton.xpm
+--- skins/default/mutebutton.xpm
++++ skins/default/mutebutton.xpm
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * mutebutton_xpm[] = {
++static const char * mutebutton_xpm[] = {
+ "16 9 18 1",
+ " 	c None",
+ ".	c #B7BAC7",
+diff --git skins/default/redlight.xpm skins/default/redlight.xpm
+--- skins/default/redlight.xpm
++++ skins/default/redlight.xpm
+@@ -1,5 +1,5 @@
+ /* XPM */
+-static char * redlight_xpm[] = {
++static const char * redlight_xpm[] = {
+ "3 2 2 1",
+ " 	c None",
+ ".	c #FF0000",
diff --git a/alsamixer-dockapp.spec b/alsamixer-dockapp.spec
new file mode 100644
index 0000000..dc6885e
--- /dev/null
+++ b/alsamixer-dockapp.spec
@@ -0,0 +1,50 @@
+%global pkgname AlsaMixer.app
+
+Name:           alsamixer-dockapp
+Version:        0.1
+Release:        3%{?dist}
+Summary:        Simple mixer application for ALSA drivers
+
+License:        GPLv2+
+URL:            http://dockapps.windowmaker.org/file.php/id/253
+Source0:        http://dockapps.windowmaker.org/download.php/id/517/%{pkgname}-%{version}.tar.gz
+#This avoids compiler warnings which might become unsupported in later gcc versions
+Patch0:         %{name}-const.patch
+
+BuildRequires:  alsa-lib-devel
+BuildRequires:  libXext-devel
+BuildRequires:  libXpm-devel
+
+
+%description
+AlsaMixer.app is a WM applet sound mixer utility for Linux systems with ALSA
+sound driver. It works with Alsa and PulseAudio. 
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+%patch0 -p0
+
+%build
+make CXXFLAGS="%{optflags}" %{?_smp_mflags}
+
+
+%install
+mkdir -p %{buildroot}%{_bindir}
+install -p -m 755 AlsaMixer.app %{buildroot}%{_bindir}
+ln -s %{_bindir}/%{pkgname} %{buildroot}%{_bindir}/%{name}
+
+%files
+%doc COPYING README
+%{_bindir}/%{name}
+%{_bindir}/%{pkgname}
+
+%changelog
+* Thu Oct 11 2012 Mario Blättermann <mariobl at fedoraproject.org> - 0.1-3
+- Added patch to avoid compiler warnings
+
+* Sat Oct 06 2012 Mario Blättermann <mariobl at fedoraproject.org> - 0.1-2
+- Don't mix spaces and tabs
+- Renamed the spec file to avoid the period
+
+* Sat Jul 28 2012 Mario Blättermann <mariobl at fedoraproject.org> 0.1-1
+- initial version
diff --git a/sources b/sources
index e69de29..0565c03 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+df3548182e10370f75c1c978e4a1b64d  AlsaMixer.app-0.1.tar.gz


More information about the scm-commits mailing list