Mongoose Web Server Spec
@ 2010-03-10 20:19:33
Filed under: Code Fedora Linux Python Tech
I happened to take a look at this and see there wasn't a package for it. It's one of those items that I don't have time to keep up with but I think would be a nice package to have in Fedora. If anyone wants to pick up with this and run with it be my guest!
The package includes a subpackage for devel (a single header file) and a subpackage for the Python bindings. There is also a patch to get the Python code to find the shared object.
Have fun!
Patch: mongoose-site-location.patch
digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Playing With the Palm Pre @ 2009-07-11 15:18:46
Filed under: Linux Tech
I bought a Palm Pre and so far, it's awesome. I've had it for about a week. I like to write software and break stuff so I decided to sign up for the SDK the same day I got the phone. After a few days of not getting the SDK I took it into my own hands to start poking around the phone. I find it interesting sqlite3 is being used for local data sources. Pretty cool (and easy) to use ....
I look forward to dissecting more when I get some time.
digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Impressed by KDE On Fedora 11 @ 2009-06-13 13:29:51
Filed under: Fedora Linux Personal Tech
I really am. I'm using it right now and might switch over to it for my general work. It's decently fast, pretty eye candy, has a lot of good default applications and, like GNOME, is very easy to use. Good job to the KDE guys as well as the Fedora KDE packagers!
digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Updated Desktop Theme Yet Again @ 2009-03-07 19:02:58
Filed under: Linux Personal Tech

digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Package Management: Use It @ 2009-02-02 20:41:00
Filed under: Linux Tech
I like package management. It makes deploying software so much simpler and reproducible. I don't get why so many people do not use package management. I understand why a home user may not see the benefit when installing a few applications on their systems ... but if a system administrator doesn't use package management I have to wonder. A company that is running a server for a group I'm helping out installed git for us on the server. The server is CentOS ... but they didn't use an RPM ... they downloaded a source tarball, ./configure; make; make install missing some dependencies and then said it was ready. Really? This isn't a desktop!
The only things I dislike more than not using a package manager are 1. using multiple methods of software tracking. (Mac OS X is a great example of doing it wrong: some things are installers, other things are packages, other things are appdirs. You could also add ports in there too. Yech!) 2. Package managers without any standard information (think Java's jars. Yeah, now stop so you don't die).
digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Filed under: Code Fedora Linux Python Tech
I happened to take a look at this and see there wasn't a package for it. It's one of those items that I don't have time to keep up with but I think would be a nice package to have in Fedora. If anyone wants to pick up with this and run with it be my guest!
The package includes a subpackage for devel (a single header file) and a subpackage for the Python bindings. There is also a patch to get the Python code to find the shared object.
Have fun!
Patch: mongoose-site-location.patch
--- bindings/python/mongoose.py 2010-03-10 20:07:53.735407453 -0500
+++ bindings/python/mongoose.py 2010-03-10 20:09:08.935760549 -0500
@@ -110,7 +110,8 @@
def __init__(self, **kwargs):
dll_extension = os.name == 'nt' and 'dll' or 'so'
- self.dll = ctypes.CDLL('_mongoose.%s' % dll_extension)
+ from distutils.sysconfig import get_python_lib
+ self.dll = ctypes.CDLL(get_python_lib(1) + '/_mongoose.%s' % dll_extension)
start = self.dll.mg_start
self.ctx = ctypes.c_voidp(self.dll.mg_start()).value
self.version = ctypes.c_char_p(self.dll.mg_version()).value
Spec:# sitearch for others (remove the unneeded one)
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
Name: mongoose
Version: 2.8
Release: 1%{?dist}
Summary: Simple and easy to use web server
Group: System Environment/Daemons
License: MIT
URL: http://code.google.com/p/mongoose/
Source0: http://mongoose.googlecode.com/files/%{name}-%{version}.tgz
Patch0: mongoose-site-location.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Mongoose is an easy to use web server. It can be embedded into
existing application to provide a web interface to it.
%package python
Summary: Python bindings for the mongoose web server
Requires: mongoose
%description python
Mongoose is an easy to use web server. It can be embedded into
existing application to provide a web interface to it. This
package includes the bindings for the Python programming language.
%package devel
Summary: Development files for the mongoose web server
BuildArch: noarch
%description devel
Mongoose is an easy to use web server. It can be embedded into
existing application to provide a web interface to it. This
package includes the development files.
%prep
%setup -qn %{name}
%patch0
%build
make %{?_smp_mflags} linux
%install
rm -rf $RPM_BUILD_ROOT
# Install the base
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
cp %{name} $RPM_BUILD_ROOT/%{_bindir}
cp %{name}.1 $RPM_BUILD_ROOT/%{_mandir}/man1/
# Install the python bindings
mkdir -p $RPM_BUILD_ROOT/%{python_sitearch}
cp bindings/python/mongoose.py _%{name}.so $RPM_BUILD_ROOT/%{python_sitearch}
# Install the development files
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/%{name}/
cp %{name}.h $RPM_BUILD_ROOT/%{_includedir}/%{name}/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.gz
%files python
%defattr(-,root,root,-)
%{python_sitearch}/_%{name}.so
%{python_sitearch}/%{name}.py*
%files devel
%defattr(-,root,root,-)
%{_includedir}/%{name}/
%changelog
* Wed Mar 10 2010 Steve 'Ashcrow' Milner <me@stevemilner.org> 2.8-1
- Initial spec
digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Playing With the Palm Pre @ 2009-07-11 15:18:46
Filed under: Linux Tech
I bought a Palm Pre and so far, it's awesome. I've had it for about a week. I like to write software and break stuff so I decided to sign up for the SDK the same day I got the phone. After a few days of not getting the SDK I took it into my own hands to start poking around the phone. I find it interesting sqlite3 is being used for local data sources. Pretty cool (and easy) to use ....
# from /var/palm/data/Databases.db sqlite> select name from databases; email_accounts carrierbook currentState browser_data paged_launcher_apps SpazDepotTweets SpazDepotPrefs SpazDepotTimelineCache com.pandora.palm com.pivotallabs.webos.tweed __WherePrefs_v1__ Youtube splashwiki com.handmark.app.stocks Movies Settings AmazonMusic sqlite>
I look forward to dissecting more when I get some time.
digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Impressed by KDE On Fedora 11 @ 2009-06-13 13:29:51
Filed under: Fedora Linux Personal Tech
I really am. I'm using it right now and might switch over to it for my general work. It's decently fast, pretty eye candy, has a lot of good default applications and, like GNOME, is very easy to use. Good job to the KDE guys as well as the Fedora KDE packagers!
digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Updated Desktop Theme Yet Again @ 2009-03-07 19:02:58
Filed under: Linux Personal Tech

digg it
seed it
del.icio.us
ma.gnolia
Comments: 0
Package Management: Use It @ 2009-02-02 20:41:00
Filed under: Linux Tech
I like package management. It makes deploying software so much simpler and reproducible. I don't get why so many people do not use package management. I understand why a home user may not see the benefit when installing a few applications on their systems ... but if a system administrator doesn't use package management I have to wonder. A company that is running a server for a group I'm helping out installed git for us on the server. The server is CentOS ... but they didn't use an RPM ... they downloaded a source tarball, ./configure; make; make install missing some dependencies and then said it was ready. Really? This isn't a desktop!
The only things I dislike more than not using a package manager are 1. using multiple methods of software tracking. (Mac OS X is a great example of doing it wrong: some things are installers, other things are packages, other things are appdirs. You could also add ports in there too. Yech!) 2. Package managers without any standard information (think Java's jars. Yeah, now stop so you don't die).
digg it
seed it
del.icio.us
ma.gnolia
Comments: 0

