]> git.pld-linux.org Git - packages/json-c.git/commitdiff
- switch to /usr/include/json-c dir must be done at some moment anyway auto/th/json-c-0.11-3
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 13 Dec 2013 18:46:22 +0000 (19:46 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 13 Dec 2013 18:46:22 +0000 (19:46 +0100)
  (/usr/include/json will be dropped), so do it now (using pretrans script)
- handle -ljson compatibility by symlink to libjson-c.so (stub libjson doesn't work with PLD rpmldflags)
- release 3

json-c.spec

index 9ba6f052e964a1e6dbeab2f460faae986f31091e..504e0a72c6fbe84f91b3f94c7cae0db6b91b32e6 100644 (file)
@@ -2,9 +2,9 @@ Summary:        A JSON implementation in C
 Summary(pl.UTF-8):     Implementacja JSON w C
 Name:          json-c
 Version:       0.11
-Release:       2
+Release:       3
 License:       MIT
-Group:         Development/Libraries
+Group:         Libraries
 Source0:       https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz
 # Source0-md5: aa02367d2f7a830bf1e3376f77881e98
 URL:           https://github.com/json-c/json-c/wiki
@@ -59,18 +59,26 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{_includedir}/json
-%{__mv} $RPM_BUILD_ROOT%{_includedir}/json{-c,}
-ln -s %{_includedir}/json $RPM_BUILD_ROOT%{_includedir}/json-c
-
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
 
+# link with libjson-c directly (stub libjson won't work with --no-copy-dt-needed-entries
+ln -sf $(basename $RPM_BUILD_ROOT%{_libdir}/libjson-c.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libjson.so
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
+%pretrans devel
+# transition from 0.11-2
+[ ! -L %{_includedir}/json-c ] || rm -f %{_includedir}/json-c
+# transition from <= 0.10 and 0.11-2
+if [ -d %{_includedir}/json -a ! -d %{_includedir}/json-c ]; then
+       mv -f %{_includedir}/json %{_includedir}/json-c
+       ln -sf json-c %{_includedir}/json
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS COPYING ChangeLog README README.html
This page took 0.130226 seconds and 4 git commands to generate.